This is why firms that do actual training have clauses written in the employment contract that says if you receive x months of training from them then you have to work for them for at least y number of years otherwise if you leave then you have to pay them for the cost of training you (which is written as a dollar amount in the contract).
Companies that don't have that kind of clause in the contract are going to get screwed over when their newly trained employees get poached by other firms.