It could be racism, or it could be because the reviewers eyes fell on different words while they were skimming the CV, or it could be because the reviewer was slightly more tired for one of the CVs. This sort of thing is very hard for a human being to be consistent at.
You are making sense, logically. That’s how it should be: If you are a better candidate, you should get the interview.
But picture this nonsense scenario that I think is nevertheless illustrative of the problem: the hiring manager is overworked, at the end of their 12 hour shift filling in doing odds and ends because they’re understaffed and the guests need service, a kid threw up in the pool, there is a standards compliance issue regarding detergent and it might be illegal to wash the sheets with this, the breakfast delivery was cancelled and in six hours there will be hungry guests, and there are 30 CVs to read while they’re on hold talking with an emergency industrial bakery.
Those CVs are not getting the attention they deserve. The job won’t be going to the best candidate. The job will go to whoever seems most acceptable of the 5 CVs they managed to read before the croissants got ordered and they’re off to their next emergency.