An example from late 19th century Mexico: Tiendas de Raya.
The drill worked like this. You live in a poverty riden rural area, and an "enganchador" (lit. hooker, but its kind or a recruiter) comes town and offers you a job elsewhere. You sign up and leave with this guy.
Upon arrival, you learn that you have to pay for the recruiter fee, which is always more than whatever money managed you brought with you for the trip. So your options are either debtors prison or ask your new boss for a single early payment. It's day one and you start in the red.
You are new in town, nobody knows you and will not do business with you unless you bring money upfront. That is, nobody except for "la tienda de raya" your bosse's personal side business, that is happy to extend you a credit line with your paycheck ("la raya") as warranty. Everything is more expensive there, but they will give you everything you need because you are "one of the bosse's men".
So, you are down the hole and digging. An extremely unusual degree of self control over a lengthy period of time is required to cut down your consumption enough so that you will sometime pay your debt. If you manage to do that, you will be able to shop at the same stores as normal people does, and benefit from it. But you will always have the temptation of going to the tienda de raya again for special one of purchases (like that special dress for your daughters wedding), or if the inevitable event of life set you back (like if you need to have a tooth extracted and end up short of cash before the next pay check).
And if you ever try to quit, or loose your job, it is debtor's prison again.