Capitalism is in a permanent prisoners dilemma.
Overall they need to treat their employees well so that there's growth in the economy, since no one to buy things means no market to sell things. However, they can also choose to screw over their employees with bad pay, terrible conditions, or in this case, automating their workforce and firing people.
If no one screws their employees, the economy expands with modest growth.
If one or few corporations screw their workers while everyone else doesn't, they become fabulously rich and the rest get outcompeted.
If everyone screws their workers, then the economy collapses because there's no growth, and everyone eventually goes out of business.
Magazine size laws aren't really effective at doing anything. Up in Canada you can't have a rifle magazine with more than 5 rounds. However, almost all of the magazines are full size magazines that have been modified to hold fewer rounds. All of the responsible owners leave them at 5, but with a minute or two of work you could turn most of them into full size again. We don't have mass shootings every day.
Gun violence in America is a culture issue. You're broken.