Because if they didn't show black people in the movies in America, it would be considered racism, bigotry, and the worst violation of civil rights that one could ever perpetrate. Therefore studios find black people to fill such roles so that they don't have to deal with the backlash of not having black people in movies like this.
Even CDPR has been criticized to no end for not having more ethnic, or black people in the Witcher 3. Therefore, when Netflix made The Witcher series, they made sure to put a bunch of ethnic characters in the show, even if the show is about European history, and lore. But, they have to do it. I know, it's idiotic. Imagine if there was a game, or show that focused on pre-colonial sub-sahara African history and lore. And, in this show there were a bunch of white and Asian actors representing characters in black history. Yup. That would make a lot sense... In fact, there would be hoards of blacks and Africans that would cry fowl as to how inaccurate that historical representation would be. That would be valid. But when the white man wants to make a show about his/her own cultural heritage/history, that doesn't have black people in it, that's considered to be racist.
This is the idiotic world we live in today.