Isn’t that the point tho? The author created a purposefully imperfect world where the children could recognize the injustices and stand up against them. That’s role modeling the right behavior. Our world is certainly not perfect and we have to stand up against bigotry and injustice (like transphobia). And the heros in the hp stories make mistakes but they learn and improve themselves - Rowling could learn from her own books!
Isn’t ketchup pretty much just red sugar gel?