With the IANAL caveat: that helps prevent one type of employee abuse, the "retaliation termination" intended to force an ex-employee out of the country rather than starting their new job. (Which is also the reason why a visa worker who is waiting on the H-1B "transfer" is advised by immigration lawyers not to tell their current employer that they are thinking of leaving, no matter how much they want to.) But, that's just one situation.
As a for instance, employers will(illegally) demand that the H1B worker reimburse them for the legal and filing fees as a form of retribution for transferring. While certain greencard sponsorship related expenses can be recouped if the H1B is that far down the line, any visa related costs (attorney, filing fed) must be payed for by the sponsor.