How did they get it wrong? They inspected him and let him in. Not every secondary inspection of a racial minority is racist.
When they detained a white Australian lady, you suggested that they had googled her name at primary and referred for secondary inspection based on her political beliefs.
You seem to grasp for a nefarious motive whenever you see any story about a CBP secondary inspection, even when there's no evidence to support that. Referring people of various backgrounds to secondary inspection is part of their job.