How is that legal? If you think the local applicant can do the job, you legally can’t hire the H-1B over them, right?
That's how I understand OP, if that's legally true or not, I don't know.
However, what OP is missing is that rejecting the US citizen application based on their citizenship is still likely a prohibited discrimination case regardless of what they do with the existing employee.
They might be running afoul of discrimination laws if they only interview US citizens to cut down on their workload for fake interviews, but I'd guess someone this careful (e.g. not actually submitting the greencard sponsorship where many employers would with a wink and a nod) is likely careful enough to not filter candidates on such obvious things either.
It's a problem with the h1b (and green card) program itself, not OPs behavior. If anything, OP is probably in the top few percentile of ethical businesses/managers if they are actually denying the sponsorships because they made a good faith attempt to test to see if the local market had appropriate candidates.