I did work briefly work for a small consultancy that decided to take on juniors, even though it was anticipated that for probably a year they woudln't be billing enough to cover their salary; because there weren't a lot of qualified applicants anyway where we were located, and as a sort of intentional public service to help people get into the field (especially underrepresented people etc).
Of course, the most skilled juniors quickly left for higher paying jobs elsewhere around when they started to actually make back their salaries in billing. There were no hard feelings, the company knew that could happen and could afford it, and of course, why wouldn't they? (I mean, I guess it was hoped that sometimes they would prefer working for the consultancy for a while). But it was a kind of experiment, and indeed the experiment showed it was not really a sustainable model, I think they stopped doing that.
I also did this with my consultancy along with reimbursing employees for passing certifications and paying for tuition. Three of them work for Microsoft now and one works for Amazon. Others are at other big firms. I don't regret how I invested in them and I think it is great that they are doing so well in their careers, but I will not make an unsecured investment like that again.
Yup. I guess one way to "secure" it would be to try to make them promise to keep working for you for a certain amount of time, but even if there's a legal way to do it, that just seems icky, who wants to force people to keep working for you when they don't want to, or the environment that will come from working with people who would rather be somewhere else but are being forced to stay. That's not a good solution.
In a standard tuition reimbursement situation, you have to stay at the company (even if you don't want to) and maintain a certain grade point average. Why can't software companies adjust to this but other kinds of employees can?
It's sad to read comments like yours because I'm a junior dev myself. I can't blame you, though, because as I pointed out above, it's all due to perverse incentives in this industry.
The problem, which I've commented on and experienced many times, is that companies don't have enough incentive to fund training of junior developers. In a culture where devs switch jobs every 2-3 years, there doesn't seem to be enough runway to train a junior to senior level before they get poached.
I wish there was a realistic solution to this problem other than bootcamps, but I don't know what it could be.
Of course, the most skilled juniors quickly left for higher paying jobs elsewhere around when they started to actually make back their salaries in billing. There were no hard feelings, the company knew that could happen and could afford it, and of course, why wouldn't they? (I mean, I guess it was hoped that sometimes they would prefer working for the consultancy for a while). But it was a kind of experiment, and indeed the experiment showed it was not really a sustainable model, I think they stopped doing that.