Many believe that the workhouses were like prisons, but that is not so. The growing population up until the late 1840s in London consisted of a rather large number of very simple people. Just imagine London Kensington or Chelsea today if everyone could afford a pig and ran a squalid pig farm with no sewage system. That was pretty much what London looked like back then, before the industrial revolution sewage system and the Western Line arrived, and Kensington rid themselves of the pig farms and the farmers.
A that time the workhouses were good willed, privately funded but lacking legal structure and a concept. If you were sentenced to go there, it would be at the grace of the said owner at said workhouse, as Charles Dickens so graphically decribes.
It must have been a miserable life back then, but the workhouse would become the very last option for many, and simply a means to get food and board for ones self and ones children for a while.