It depends.
I’d say for fictional characters it doesn’t matter at all unless race is pertinent to the story. Skin color, hair color, none of it matters much for most stories.
If the story is about some kid who becomes a NeoNazi, then I’d say it’s reasonable not to cast an actor who appears to be a minority to the audience, unless it’s live theatre and the available actors are all minorities.
I think movies done on a large scale, big budget, are different than local theatre or low budget movies, but the producer and the person in charge of casting certainly can do whatever they want.
Even when I think casting someone who is the same race or ethnicity as the character matters, I don’t care if they aren’t really that race or ethnicity. If someone who identifies as Welch easily passes for Hispanic, and the part calls for a Hispanic character, I don’t feel like the actor must be Latin American or Spanish. There was some backlash when Catherine Zeta-Jones was cast in Zorro.
I remember when there was an uproar when the movie Selena was being filmed and people were upset that Jennifer Lopez was Puerto Rican (really Newyorican) and Selena was Mexican-American. People even get pissed within the same category of ethnicity.
Sofia Vergara had trouble getting cast in Hispanic roles, so she started dying her hair black, and everything changed. She has a very strong accent, so getting casted as an American born and raised in America wouldn’t work for her.
I think since the American movie, TV, and even live theatre has been dominated with “white” people there is a desire to have minorities get parts that have traditionally been given to white people. I agree with this for many reasons.
As far as the recent Mermaid upset, the actress looks like the mermaid to me. Her race was completely irrelevant to me, I didn’t even notice, or think of the actress as a black person. But, I tend to not notice race in a lot of situations where people do, although I admit to noticing ethnicity in some situations when some people don’t. Ironically, I’ve recently discovered that some black people take really big offense if you don’t “see” them as black, but that’s for another Q.