My answer to why companies should train people if they can just leave for another company is twofold:
1: It evens out. Sometimes people will leave company A, which trained them, and come to your company, and other times they you will train them and they will leave. As long as the relative rates are about even, it should be ok.
2: Any general training that would apply to all similar companies can just as easily be acquired on the job at any given company. So train the employees, and if you really don't want to lose your 'investment' then perhaps treat them nicely?
Why are we always so quick to cry a river for huge organizations that hold a disproportionate amount of power over individuals?
2. "Treat people nicely" is about as effective a corporate policy as a law is forcing people to "be good and moral." A small company can effectively assert hiring control in hiring only people who "gel" with the people leading the company. A large company with a hiring quota of hundreds or thousands of people a quarter cannot. Ultimately, people are going to have personality conflicts with coworkers at large companies. You can either accept that as an inevitability and find a solution for it, or you can write off people finding (somewhat legitimate but still entirely foreseeable and unavoidable) excuses to move as BigCo management not treating their workers "nicely".
If that's what you're saying, it's a false dichotomy.
Cry me a river for the corporations, who cares what they want? It's always their agenda that wins these days anyway. That's the way the world is going.
Yes, one way, in theory, of doing that is by offloading training externalities to higher education. But that has its own tradeoffs, namely, the tendency of universities to adopt ivory-tower attitudes to education, the tendency of American higher education to inflate costs beyond any reasonable limit to afford facilities, services, and administration of dubious value to the education afforded the end consumer / student, and the tendency of universities to not educate with an eye to the skillsets which contemporary employers value.
Which is why the better way is to localize training efforts with the actors for whom it is most relevant. But corporate actors are not going to do "the right thing" in a vacuum, the law needs to empower them to do "the right thing", because typically "the right thing" will hurt any actor who does it in isolation but is bearable if all actors commit to doing it together. The easiest, safest, and most predictable way of making that happen is through law or regulation.
2. Treating 'nicely' is far from enough if another company is simply able to offer a better package. For example, are small/new tech companies not deserving of keeping their investments because they can't pay their devs as well as some large ones? Or if they can't match the prestige of other companies?
As I said in point #1, as long as the rate of defections/arrivals is about even, then your losses on one employee would be offset by your gains on others.
So I have no clue what the solution is, all alternatives seem to be negative.
Sure, I could still leave prior to the agreed upon term but I'd be required to pay back their investment. I thought that was fair.
I got a huge relo bonus once to move cross-country. But it had a 2-year clause attached to it, so if I had left after a year, for instance, I would have had to pay back 1/2 of it.
I don't see why the same couldn't be done for education paid by employers.
Remember, a non-compete doesn't prevent people from leaving, it just prevents people from leaving and taking a job in the same field. Most people won't want to leave their field, which is why the non-compete is effective, but in the case of exploitation, people still have an out. An educational debt would follow somebody if they decided to leave, and that's therefore much more coercive and prone to exploitation.
Welcome to the flip side of doing away with non-compete agreements. Why should a business invest so much money in training workers when they'll just get poached away by a competitor who is virtually guaranteed to be able to offer higher pay, not just for the value of the trained skill but because the competitor doesn't need to pay the overhead costs of training them? When new employees can leave their contracts at any time and for any reason, the expectations of employers necessarily shift away from training.
Now of course, reality is a little more nuanced. Training for long-time employees to keep them up-to-date makes more sense since they have so much domain experience internalized. A just law would need to allow for some exceptions to allow employees to break their non-competes in cases like toxic workplaces, and the law would need to set a maximum term for a non-compete to prevent workers from being exploited for low pay for their entire working lives.
But the notion that employers today should take "no-experience-needed" candidates off the street, give them 6+ months of full-day training with pay, and allow them to walk right out the door a week later to their competitor... is laughable on its face.