Beside, best techs from other countries are already in demand at home, no need for them to move. "The best" is not someone US would get from H1B visa program.
Reality check: tech companies hire all sorts of people in all sorts of places for all sorts of reasons.
Back in 2006 I got a job with Google SRE (at the age of 22) and they gave me a choice of locations. I chose California. But it was 2006 and the economy was booming, and that year they hit the H1B visa cap. I wasn't considered important enough to use up one of the last H1Bs they had (fair enough), so ended up moving to Switzerland instead. Over the following years I was promoted several times, invented a major new spam filtering technology they now use on all their biggest products, and earned a hell of a lot of money. Which I spent in Switzerland. I left in January to form my own company, although Google wanted me to stay.
Had I obtained an H1B, I would probably have done substantially similar things in the USA, but thanks to attitudes like yours that wasn't possible. I'm not complaining though. Having spent plenty of time in the Valley I came to appreciate my luck in not ending up there. Why would I want to live in a suburban desert like the bay area, or San Francisco where it seems the local population viscerally hates tech workers, when I can live ten minutes walk from a lake so clean people swim in it every day during summer and the local population still thinks Google is cool?
Looking back, I got lucky that I was denied an H1B. But economically speaking that was Switzerland's gain and America's loss.