That's a factor, but I think the H1-B lock-in is more important. Assuming no mistreatment at all is occurring, an employee who you can be fairly confident won't quit still has extra value to you. The H1-B requiring that the employee either goes back to their original country or lines up another company to take over the visa means that they're much more likely to stick around.