Actually, as a hiring manager, you can't discriminate between whether someone is a U.S. Citizen or an H1B. So in reality, you're going through a stack of applicants in order. If your HR group puts a bunch of H1B's in front of a citizen candidate, that's it.
So no, your assertion that there is an implicit "there is no American we can hire to fill this" is false. We can't even consider that.
You absolutely can discriminate on the criteria of 'will this person require a visa now or at any point in the future', and tons of companies put that requirement right in their job postings. If your company told you otherwise they are mistaken
> The Immigration Reform and Control Act of 1986 (IRCA) makes it illegal for an employer to discriminate with respect to hiring, firing, or recruitment or referral for a fee, based upon an individual's citizenship or immigration status. The law prohibits employers from hiring only U.S. citizens or lawful permanent residents unless required to do so by law, regulation or government contract
Your quoted text says 'unless required to do so by law, regulation'.
H1-Bs would legally require a visa transfer to switch employers, and the company can simply choose to not sponsor or transfer that visa. Thus, the worker is not eligible to work for them. Here are 3 immigration attorneys explaining this in another way https://www.avvo.com/legal-answers/can-a-company-refuse-to-c...
Also, what hiring manager is letting HR decide in what order their candidate pool is meritorious? HR can barely judge a local talent contest let alone someone's ability to undertake skilled work. If I say to my HR that a candidate needs to know Python with environmental experience I'm just as likely to have a candidate put forward who was a wildlife carer 20 years ago since they handled pythons as I am to find someone who can script and understands climate data. They will probably also give me someone who is good with Java, since it's all just computer programming.
Look, like it or not, we all have to work with our HR apparatus. If I have the choice between running their department and keeping mine functional, I have to accept that they at some level know what they are doing. Not to mention, when your HR head has the JD, and you don't, what you think you know is outweighed by their credential.
Now, was I misinformec by an HR person during my time as a hiring manager? Maybe. But guess what, I didn't control their pipeline, and I had work to make sure got done. I'll definitely be adding HR people to my list of groups to talk to when interviewing companies interested in hiring for a hiring manager position though, because the sheer amount of hell that experience came with was beyond unreasonable.