My old company used to hire broke, desperate, and underachieving college students out of the local university for that exact reason - desperate people are often the most dedicated people.
The scheme worked something like how the New England Patriots run things: keep a solid core of veterans well-paid and happy, then use them to train the hell out of new hires. Later, make sure those new hires get excellent jobs elsewhere in 4-6 years and repeat the cycle, ensuring that you never have to pay for premium talent since you can develop it at budget cost in-house.
When I say "train the hell out of", I mean each new dev had a senior dev dedicated to just them who would criticize everything about their code and workmanship like a Mr. Miyagi. Every email that dev sent also got CC'd to that senior dev and the senior dev always knew what they were working on, how long such a thing should take them, and knew what questions/difficulties were likely to come up and when during the process of that item. Good mentorship cannot be substituted for during the training process.
The system fell apart once management got flipped and forgot what made them successful in the first place.