A Batman could be black. Bruce Wayne can’t be. Bruce and the Waynes as a whole, come from institutional wealth. Their money has always been very long and amassed over decades. That sort of thing has to be a white guy coming from that much money because just historically, we don’t come from that kind of money. If/when we do, it will be starting with our parents generations, the first generation able to go out and make money and start their families post segregation post voting rights act, etc.
A writer I follow wrote a little about this in the Hollywood reporter. He puts it a lot better than I did:
On the other hand, let's take Batman. Or, rather, Bruce Wayne — another role that Elba's name has been mentioned for more than once. In DC Comics lore, the Wayne family has been part of Gotham City since before there was a Gotham City. They helped build it, the way the Carnegies, Vanderbilts and the Rockefellers helped build New York. To extricate the Waynes from Gotham would be like trying to take
the sugar from a baked cake: Even if you could, why bother? No one would want what was left, anyway.
The Waynes, generation after generation, took as much from Gotham as they gave. Much of the crime that infected the city was as
a result of the income gap enjoyed and propagated by the Waynes — until Bruce's father, Thomas, bucked the family code and became a doctor. He married a woman, Martha, who believed in charity. And they taught their son to be better than the Waynes that came before — that it is Bruce's responsibility as a Wayne to make Gotham a better place.
Bruce Wayne has to come from old money because he has to feel the generational guilt that comes with being a Wayne. So that when his parents are murdered on the streets of Gotham, the mania that grips a child is informed by those lessons from parents who chose to be better. To save lives.
Bruce Wayne has to be white because that kind of legacy and wealth don't exist in the African-American community. (Yet.) For that character to be true to who he is, he can't be anything else.