Becuase whites tend to like neighborhoods with lower crime rates.
Call me racist, I don’t care. Name me one majority black neighborhood that does not have a high crime rate.
FWIW, there is a black family in our working class neighbourhood who told me that they relocated here for precisely that reason. Their younger kids are well behaved. Their first kid was told he wasn’t welcome to come home after some petty criminal behaviour violated our neighborhood a few years ago.