Going from the movies, where the majority of his popularity comes from, Stark seemed to be largely unaware of what his company was doing. He believed they were making weapons that protected soldiers from the enemy. It was only when he was captured that he realized what was going on. He then changes his company from making weapons to whatever they make now, the movies aren't really clear. He at least seems to be trying to use the Arc reactor technology as a power source that would benefit the world more than continuing to use oil.
It also helps that RDJ has done an amazing job making Tony Stark absolutely charming and likable.
Bruce Wayne also gets a pass because he helps people and his company focuses a lot on improving Gotham. The Nolan movies show that his father ran the company the same way, they only changed after his death and before Bruce took over again.