This was the time, however, that the Progressive movement was battling hard to usher in a different way of life for America, one based on socialism and interventionism. The socialism came in the form of the welfare state, with its crown jewel being Social Security. The interventionism came in the form of government regulation, control, and management of people's economic activities.
The Court's decision in Lochner was simple and straightforward. The Court relied on the 14th Amendment to declare the law unconstitutional, specifically that part of the amendment that prohibits a state from depriving any person of life, liberty, and property without due process of law.
The Court correctly held that liberty encompasses the right of people to enter into mutually agreeable contracts with each other. These include labor contracts, i.e., those contracts in which people to work for an employer.