It depends on the 'role' that character plays in the story.
moral purity
The Wicked Witch of the West in the original book is a pure antagonist, that's her role in Dorothy's story. She's still an entertaining character written with some winking humor, but her role is the ultra-bad, an irredeemable despot, a fearsome tyrant. She cannot be sympathetic because (spoiler) 6 year old Dorothy kills her, completely by accident, and this shouldn't be morally complicated for the intended audience.
In the book, each chapter is structured to be an episodic bedtime story with the adventurers arriving at a new location, discovering some conflict and 'solving' it, each with a unique climax and denouement, also switching out which team member saves the day. The chapter where everyone is prisoner at the Witch's castle is 'solved' by Dorothy, but it's not a pivotal character moment or anything.
The Witch was bad and oops she died, but we don't feel the least bit sorry.
protagonist's POV
The 1939 film goes a step further, turning the Witch into a caricature of Dorothy's real-life antagonist Almira Gulch (not in the book). This exaggerated incarnation is the meanest mean-person that Dorothy can imagine. In Dorothy's naive fantasy, everyone is afraid of this witch-woman because 'everyone' is an extension of Dorothy. Adults can assume that Almira has multi-dimensionality the Witch lacks, but again it's Dorothy's POV, and Almira has threatened to take Toto away.
In the film, Dorothy emerges from her fantasy having learned a parable about using her brains, and being brave while remaining good-hearted, and also that people will forgive you for lying if you fess up –– these are skills that Dorothy might take to Almira's 'castle' and apologize for Toto chasing her chickens, but the core Oz story is a fantasy adventure not a morality play. (Kids wouldn't like that ending, and fantasy Dorothy 'solved' the conflict by throwing a bucket of water which would not improve the situation with Almira.) The nuance is interesting, but Dorothy would become an unreliable narrator, a fabulist who needs to learn a moral lesson. Dorothy isn't that character, so we never resolve the situation with Almira and Toto.
analogy and deconstruction
In the 1975 musical The Wiz, Oz becomes a metaphor for the inner city and various forms of institutional Black oppression. The Witch is framed as a 'local boss' exploiter, her castle is a sweatshop. This satirical version of the Witch is gleefully petty and proud of her power-imbalance, while mimicking the music of an upstanding lady spreading 'positivity'.
The mixed-message is for adults in the audience. The music is styled as hand-clapping foot-stomping charismatic Black church gospel, while the lyrics betray how horrible she is as a person. The scene entertains on multiple levels, to multiple age groups. Kids see a villain, adults can find a level of ironic social criticism.
(Not) Better with character depth?
This same Witch character has been re-imagined as an un-popUlar college student in the book and play Wicked. I believe other characters were similarly re-vamped as college students. I don't know the story, but it fits with the last few decades of 'rehabilitating' classic villains with an anachronistic origin. The story has nothing to do with the original book, and is a modern 'outsider' parody of the cultural archetypes they represent.
The character was again re-origin-ated in a 2013 film as a wronged Mila Kunis who turns green because James Franco cheats on her. Having seen this film, the addition of a boyfriend-centered evil-origin felt like a weird mischaracterization and pointless 'just so' story. (Like, couldn't she just have been born evil...? Her sister is evil..., so maybe it's a family trait...? No, it was because of a guy she literally just met. The sister was born evil, though... because a moron wrote this script.)
A backstory is lore, not characterization
I understand the importance of not making characters one-dimensional,
like spicing things up so the jock is actually a genius or the mean
girl is only mean to people she knows who are bad but they act all
innocent so she does come across as quite a b-word.
But should it be alright to write characters' roles as their roles
sometimes? And it's just up to the writer to do it the right way or
have good writing?
I think there are instances where showing the bully as insecure, and the mean girl as secretly underprivileged, has their place in certain types of stories. Stands to reason this 'dichotomy' might hit every character archetype in the story: wise dad just faking it, hero not always so noble.
I think it's good writing but maybe not the only way to add some character dimensionality.
I've shown there's different ways for a character to have 'depth' without undermining their role.
The OG Witch is purely bad, just as Dorothy is purely good. These characters are both flat, flat, flat... but there is a balance between them. Ironically every other character in Oz is some sort of dichotomy (cowardly lion, humbug wizard, et al) but only Dorothy and the Witch are so polarized – sort of an immutable object meets irresistible force situation. They are at a stalemate until Dorothy does something random, not realizing it was the Witch's vulnerability.
the MGM Witch is an exaggerated persona who gets her comeuppance. Margaret Hamilton used the character to teach kids about acting and how characters tell stories. The character is designed as a kind of stooge for the kids to hate. It is a melodrama villain, but she stands out in a sea of saccharine. Again, consider the audience (and cultural impact).
Since The Wiz musical number is our only scene with the villain, it condenses her entire 'reign' into a spectacle of fawning subjects while she threatens them in an upbeat song. She is satirically evil, the nuance is in her styling and music which suggests real-world analogies which are more ambiguous/narcissistic.
The 'role' the character is playing might be balanced by another character, their polarity being the interesting dynamic when they ultimately come together.
Or the 'role' might be to manipulate emotions, to set up a payoff, or to present a fallacy. They might be a potential 'dark path' example facing the protagonist, or because there is so much plot going on this character's motives really need to be clear and to the point.
I personally think we have culturally 'redeemed' too far. Darth Vader is now the protagonist, and we see real-life villains redeemed in the media and swiftly returned to their seats of power and influence.
I don't need to see villains 'redeemed' or 'explained' to be entertained – the story should handle that really. In a good story the badguy has a purpose and a culture/value system and a motivation that makes sense (not just a psychological trauma). I like villains who know they are villains, and just enjoy it because they're good at it. It's campy, but can save an otherwise average plot.