This is pretty common [edit - in the UK], and there are distinctions made in law to stop this being abused (e.g. "if you leave you owe us a million for the basic training cost")
[context, liquidated damages clauses are OK in an employment contract, penalty clauses are not]
> Case law has clarified that in order for a clause to be a liquidated damages provision rather than a penalty, it must be a genuine reflection of an employer’s pre-estimate of loss that it is likely to suffer if the employee breaches that provision. If an employer is unable to quantify the exact loss that would be suffered, a best guess of the likely loss would be satisfactory. - See more at: http://rosenblatt-law.co.uk/bulletins/are-repayment-provisio...
[snip]
> The key to a repayment sum being regarded as a genuine pre-estimate of loss appears to be that the sum specified must be compensatory and not ‘in terroreum’ or simply a deterrent to breaching the contract - See more at: http://rosenblatt-law.co.uk/bulletins/are-repayment-provisio...
http://rosenblatt-law.co.uk/bulletins/are-repayment-provisio...
My last job paid for a good portion of my masters, every time I was reimbursed for tutition there was a set amount of time I had to still be with the company or I had to repay a certain amount.
Ended up leaving before finishing my degree due to really hating the company, I was prepared to hand back 15k, but they never even bothered asking for it. Same thing happened to a coworker of mine, though it was substantially less money in that case.