They didn't pay for their infrastructure as much as they owned their employees and used the town to drain back the money they paid them, and then kicked them out if they no longer worked for the company. It was more of an indentured servant situation vs "support" of a town.
We might not like it, but this is the system that exists, and until it is made illegal at the federal level, there will always be this structure to attract companies and jobs... and we all know that isn't going to happen.