Why do almost all black americans vote Democrats?

I‘m from Europe, so I don’t have much to do with American politics. But one thing I learned is that nearly all black americans vote Democrats. It‘s like 90%+ of the black population or something like that.

To me that almost seems like kind of a defect democracy if a certain group of the population almost only votes one party every time - because normally democracy is about different choices and different possibilities. You know what I mean?

There surely must be a lot of black Americans (like there are also a lot of white Americans) who are socially conservative, economic-liberal, pro-gun etc. Do they all still vote Democrats despite them being against their political views in a lot of topics?