People always make the huge salary argument. But youre totally right. Your average senior engineer in US is making $130k. These $300k salaries are relatively rare. But people hire H1B to pay them $90k and save on benefits and salary.
The monetary saving is almost never the reason - the inability to push back on whatever crazy half-assed, maybe illegal horse shit that an incompetent manager wants to be done without blowing up their entire lives is the reason they are hired.