Because people care about doing a good job. Because they want to be popular in the community. Because the employees are afraid the law will go after them personally.
I feel like our society discounts these first two motivations in favor of money and punishment. And those are a very poor substitute a lot of the time.
A good CEO of a company is considered to be one that provides the best return on investment for the companies shareholders (this is often defended as a morally upstanding attitude, especially in a US context).
If someone is a CEO, and they care about society and about doing a good job, this will almost always mean passing up opportunities to maximise company profits. For example, in this case a diligent CEO would ensure that the company is paying for the maintenance of its equipment.
However, this isn't necessary to maintain revenue given the monopoly position that the company is in. And thus a company board looking to maximise its return on investment may choose to replace this CEO with someone who will prioritise profit over things like societal good and doing a good job.
It is these shareholders that our legal/economic system gives power to. And a majority of shareholders are amoral entities like pension funds who are not concerned with ethics, but are simply looking to maximise profit.
People want to do a good job. Including the executives, who usually are pretty removed from the day-to-day operations. To some of them, squeezing every last nickel out of the business is “doing a good job.”