Traitors are usually portrayed as the worst of the bad, as someone who deserves the cruelest kind of punishment. Yet there is a certain poetic aspect to them. Yes, most are villains, immoral backstabbers who would do everything to earn a buck. These are people to whom human attachments and relationships mean nothing. In truth, such people should never receive any real responsibility as they should be recognized as unreliable before that happens.
Then there are those who are serious, upright, strong people. These are persons who have questioned and altered a profound component of their belief or upbringing. It takes strength and courage to do such a thing, as well as a keen mind. From a writer’s perspective, such characters can give you incredible drama and plot twists if their decision and actions affect the story.
I’m not saying betraying and backstabbing is a good idea. Hell, I’ve had personal experience at being stabbed in the back by someone that meant the world to me and I know it’s not pleasant. I’m saying that what could be perceived as treason by some can also be interpreted as a great journey for a character.