I've never run a huge tech company, but even when trying to hire 10-50 engineers it's been a real slog trying to find good ones. We built one of the least biased hiring processes imaginable, promoted jobs to largely American audiences, and the pool of applicants was still hugely unqualified. We found ~2 qualified people per ~1000 applications.
American tech companies _do_ train American talent, I'm a product of this. I think you're overestimating how good we are at training software devs, though. It's not a fast process, it's not very scientific, and it doesn't seem to "take" for most people.