Because of slavery
According to the Chicago Manual of Style, "names of ethnic and national groups are capitalized". this is also supported by The Diversity Style Guide (2019).
It's also an acknowledgement that due to slavery, colonization, and trafficking, many Black people no longer have a nation or ethnic group to turn to (e.g. Nigerian, Somali, etc). therefore, we should show their only identifier the same respect we'd show Asian, Indigenous, or European people by using proper capitalization.