I think there are two main reasons for that - maybe they are really the same thing though.
One is that it's historically accurate, and that adds a layer of interest of its own. It's similar with other types of traditional theater that have that kind of element.
In fact, I might go further and say, people tend to be very forgiving of it any time the reasoning is purely pragmatic - it's a girls school production, or, as in the recent production at my kid's school, there's no boy who can sing the lead. It's not that you don't notice, but you don't make anything of it. (You could extend this to say, a production of Grease in a school in Japan - if they ever did such a thing, all the roles would be filled by Japanese kids, which you wouldn't think anything of at all.)
Also - I think theater has a whole different set of artificiality you accept - in a way like cartoons - that are more abstract. It's not meant to be purely realistic.
On the other hand you get an immersive historical drama, well, a lot of the point of it is realism.
Science fiction requires a fair bit of accepting artificialities, or alternate facts - but it in many cases anchors that in realism. And, when it's film or television, our assumption is that they have the resources to create that realism. It jars when they don't, and people wonder why they are doing it.
Maybe that comes down to - people tend not to object when artificialities are pragmatic. But when they are meant to be significant, or are ideological, or they feel an agenda is being foisted on them, they are much more likely to object.