So you'd prefer a time travel show that doesn't deal with history?That's just it though these history lessons give rise to people lecturing each other like moral overlords. Who wants that in their entertainment? It's a TV show not a documentary.
Doctor Who was originally intended to be educational entertainment. That's why two of the First Doctor's early companions were a science and history teacher. You can be thought-provoking and entertaining at the same time. The two aren't mutually exclusive concepts.
The whole point of good science fiction is to explore what it means to be human and to challenge our preconceptions through the lens of fantastical stories and settings, not to retreat from having a viewpoint or avoid doing anything that's considered potentially controversial.
Not that "racism is wrong" should be considered a controversial stance to anyone, but unfortunately it is to some people who don't like their established position of social dominance to ever be questioned.