Some companies actually do make workers sign contracts to stay a certain period of time or else they are required to pay back the employers for training or some other certifications that were paid by the company.
True, perhaps a better analogy would be that you need to repay the salary you've made.