I think you make a weak case of this being a racial thing. Someone asked if you were willing to perform a rap that you wrote? Would it be more acceptable to you if Anna had asked someone else (presumably one of your white co-workers) to do it instead?
I think if anything, this anecdote highlights the inherent problem with hiring for diversity. How can one make the claim that they ‘care about diversity’ without some way to show it off. From obvious things like ‘diversity reports’ to more subtle, perhaps even subconscious things, like trying to thrust a minority employee front and center, like ‘See, we care. Look how empowered this guy is”.
The other bit about not getting the position, guess what, this happens to everyone. It sounds like what was needed was a ‘yes man,’ and your qualifications added unacceptable level of uncertainty into a shitty middle manager’s plan.