That doesn’t directly prove that there aren’t enough Americans who can do the job. Sometimes yeah, the non American is better like in photolithography.
Generally though, the foreign candidate is not so much better that hiring an American would have lowered the bar.
Sometimes it also comes down to leveling - I’ve had to down level people due to budget concerns. Americans can hold out for that better job, but the other cannot so companies take advantage of that.
My point is that it’s not a skill issue, it’s a wage + location issue. Foreigners will find that their wage is better than what they can earn at home, so they can undercut that citizens who’s held out for a better opportunity.