By building workers’ villages, industry titans demonstrated both philanthropy and control. Employees’ health improved, while rulebooks told them how to live ideal lives.