If you look at the total cost of an employee and not just an annual salary, then the fact that they have
far less mobility makes them cheaper. Why hire the person who will bail when you mistreat them so you have to spend all that time and money finding someone new when you can have someone who risks deportation if they decide they are done with your bullshit.
I could afford to spend the next six months out of work looking for a replacement job. No one on an H1B can because they would be in violation of their visa. They will tolerate far more nonsense than I will.