There was such a thing as ethical and societal responsibility for businesses.
Thinking making profit by any means as long as they are nominally legal is acceptable for a company is just something some people believe. No natural law that says it has to be so -- we could easily (and have had) believe the opposite.
Since when? Standard oil? Or going back further, the Dutch East India Company?
Which goes back all the way to ancient Babylon in some form or another. There are countless instances in history of shady businessmen being taken to trial or punished by an angry mob.
(And the "Dutch East India Company" was accountable to its society -- and even nationalized at some point. It just exploited OTHER societies and countries).