Goals to increase diversity are not illegal. And if an HR person were to hire a non-diverse person, it would be actively going against the company goals. So why would they ever do that?
But how do you avoid hiring a non-diverse person? What if the hiring manager likes them? Simple, just don’t even give them a screening at all. “Not a culture fit”