There's a reason I'm not an anarcho-capitalist. However, government influence has a lot to do with why corporations do this stuff. Antidiscrimination laws result in a lot of lawsuits
No, there are other reasons they might do this even aside from government influence and profit: it's largely because management (and most of the ownership) truly believes in it. Management's political interests have little to do with profit.