That's only part of the story. If you lose your job, you might not be able to stay -- and competitive pay may still be lower than a US candidate.
So who do you want if you're Google? An H1-B with really heavy golden handcuffs, or a US candidate who will rush off and join the latest hot startup next week after they've tagged 'Worked at Google' on their resume?
The golden handcuffs of an H1B are not heavy. Just get in on Google's dime and join the latest hot startup next week after they've tagged "H1B" on their passport.