Today the leading cause of death is heart disease. In that era it was infectious disease. You could have a cushy job doing numbers work in a city and still die of tuberculosis from being in close quarters. People were fine with it because
everything was terrible.
In the century between the 1850s and 1950s we went from not even having radio communications or the germ theory of disease to building nuclear submarines and fiber optic data networks.
Once we had penicillin and cities stopped dumping raw sewage into the water supply, people started to have better options and these kinds of businesses had to improve safety to attract workers.
If you had to choose between the job you have now and the ones they had then, how much more would they have to pay you to get you to choose the latter? More than it costs for the safety equipment, right? So they started installing it.
Then governments passed laws requiring it because politicians are adept at taking credit for good things that were about to happen regardless.