Why would the code be subpar? Is a google employee in US somehow more competent than the one in India?
What you are thinking about was outsourcing which is very different than Google hiring in India.
Just because you are paid more you are not a ‘better’ programmer