'course, but it's a double edged sword. It creates personal understanding but also creates potential bias.
You have to be black to experience racism towards black people of course, but not necessarily to understand it.
It's like that on many subjects really. Random example that no doubt the usual suspects will jump on, but it's simply an example - you don't have to have fought in World War 2 to understand World War 2.
Sure, but no-one is free from bias - even you, believe it or not. Distance from an experience doesn’t necessarily mean objectivity.
Also, having direct experience can, rather than just make you biased, create a much deeper understanding.