Workhouses were implemented on a large scale in England and Wales following the Poor Law Amendment Act 1834. As Britain's industrial growth progressed and the populations of the cities swelled, the number of impoverished unemployed was growing: it was especially difficult for single women to find work because of gender norms, and the social support networks that had existed in the countryside were increasingly being torn apart as economic growth transformed the entire country.
The principle behind the workhouse was very simple and extremely appealing to Victorian utilitarian assumptions about people's actions. The widespread assumption was that poor people could have gotten a job if they'd wished, but they were lazy; the workhouse was supposed to be so horrible and undignified an alternative that anyone would rather take a job than be thrown into it. It was also designed to be much worse than prison, as it was believed many poor people purposefully got arrested. Victorian prison wasn't a walk in the park, of course, but it still beat starving to death; and it was believed that the large number of poor people in prison was a sign that prison wasn't deterrent enough.
In the workhouse, the work was hard, families were separated, the food was shocking - and until 1842, had to be eaten in silence! Individuals also had to submit to endless, degrading "moral education" which was supposed to teach them the error of their ways: the onus for their poverty was strictly on them. Despite these horrible conditions, many people had no choice but to submit to the workhouse. After too many decades it was finally admitted that poverty might not just be the fault of the individual, and the system which had been erected on the opposite principle was dismantled.