bail = you leave. With a greencard you're forced to stay, but with an H-1B, you can get your visa transferred to the new company you're working for (if you have another job).
In such instances, it's only fair that you re-imburse your employer for the fees that they incurred while processing your H-1B.
Why is it "only fair" that I reimburse them if I am employed on an at-will contract? The legal expenses are no different from any other one time expense such as a sign-on bonus. As such, just like sign on bonuses, if an employer believes they would be compensated for their legal expenses only if I stay there for X years, they should put it on a contract. If I think it's fair as well, I'll sign it.
In such instances, it's only fair that you re-imburse your employer for the fees that they incurred while processing your H-1B.