I'm a developer myself (degree in comp eng, minor in math, taught myself software while in high school, did my share of reverse engineering, buffer overflow exploits, and related, so I know software and hardware at a deep level). I've worked with a number of developers over the years (all remote). I'd say about 25% were in the US, the other 75% outside the US. The ones outside the US demanded similar (and sometimes higher) fees as their US counter-parts, so I don't think I have an adverse selection due to looking for cheaper foreign labor. I'd also say that it's very difficult to find good developers -- hell I'd settle for mediocre. For my last search, I had a short quiz (shouldn't have taken a mid level developer more than 10 minutes) and I only had 1 out of about 20 developers pass my quiz. Bear in mind, this quiz was only intended to test what I considered absolute basics -- if someone couldn't pass this, they shouldn't be writing code.
I was told by the COO my quiz was too difficult and to use a 3rd party testing service. I went on the 3rd party testing service he had recommended (no idea how he found it) and they had questions marked as "easy" or "hard". I picked all easy ones and looked at what it came up with. I considered those questions substantially more difficult than the ones I had on my test.
Anyway the point is, hiring developers is difficult. Their location or education does not seem to matter. In fact, one of the best developers I know didn't even finish high school, got a job at GetCo, and was able to retire after less than 10 years of working there. I think the issue is that it's just so difficult to find the needle in the haystack that it comes down to this:
Small teams can't afford to have one of their developers spending much time on the hiring process and finding a good developer is very time consuming. You can outsource some of the filtering to non-tech people, but this has other down sides.
Big teams think they can "grow" a developer, have them learn from their coworkers and such. I think this isn't as likely as one might believe, but they have the money and the human resources that if they have people slacking, with a big enough pool, it will be offset by the stars. Unfortunately compensation will be incredibly unlikely to compensate the stars at a proper multiplier compared to the slackers based on their contributions to the team.
It's been my experience that you either "get" writing code or you don't. It's like algebra. People either can wrap their head around it or they spend their life in awe of it/scared of it.