You belong to one of the strongest groups in the galaxy, almost all of the members believe you're the chosen one. You are meant to bring balance to the force, the one to destroy the Sith. During war time, you are one of the most fierce and greatest warriors of all time, not only that, but you're the greatest pilot ever seen.
The Jedi are forbidden to have relationships or children and yet Anakin Skywalker got those things secretly. We all know Obi Wan knew, he wasnt naive or stupid, he loved his best friend that he looked the other way because Anakin was happy.
Once things started going sour within the Jedi order, going against their own teachings and rules, that's when things began to change. Anakin was attached to three people. Padme, Obi Wan, and Ahsoka. His visions of losing Padme blurred his vision and his attachment to her with their unborn child took precedence over anything else that happens. His family was his number one priority and no matter what it took to save them, that's what he would do, despite what happened to him, his main mission in life was his wife and child. That is very admirable and most of us would feel the same way.
Ahsoka being outed in the jedi order and pushed away was another moment that pushed Anakin further across that line of the darkside if you can call it that. She was framed for something horrible and the Jedi didnt bother to help her at all in her time of need, they betrayed her, while Anakin tried to do whatever he needed to get her out. He looked like he was going to slice up every trooper in the prison when they didnt let her go before Ashoka calmed him down.
Obi Wan, his mentor, his best friend, his comrade, and for awhile almost like his father, had been by his side since taken off Tatooine. When he believed he was murdered during the clone wars, he snapped, he wasnt the same. Even after being told Obi Wan went under cover and the death was faked, he was pissed.
He feared losing these people as most people would be, because he was attached, which made him stronger. He didnt want to lose people he loved and he fought with an incredible intensity to protect those people, which was the way he lived. He never gave up on those in need or his friends that he loved. The amount of battles he won by sheer will shows how far he will take it despite what happens to him. Even when seeing the future and seeing how he would betray the Republic and become Darth Vader, he refused to let that happen, he was willing to give up his life in order for that galaxy and his family could live before that memory was wiped.
So many things could of happened different if the Jedi trusted Anakin or if Anakin trusted the Jedi, but because of that, he was manipulated and took a wrong turn in life. He believed his wife's life was in the hands of Palpatines, a powerful Sith lord who said he would help Anakin, but when the Jedi confronted Palpatine it ended in a battle. Mace Windu was going for a killing blow and Anakin had a choice, let Windu kill Palpatine or save Palpatine so he could save his wife. It was an impossible choice. We all know if Anakin didnt strike, Palpatine would of defended himself, that he played possum, and pretended to be weak as a test to Anakin, which Skywalker passed.
Stopping Mace Windu was understandable, but what he thought after Palpatine threw Mace out the window probably made him go "Oh shit, I'm in trouble."
After Anakin swung his lightsaber at Windu, cutting his hand off, which winded up in the master Jedi's death, he immediately became an enemy of the Jedi and Republic. There was no going back after that point. He either needed to do what he needed to do in order to help his family or go on an endless run with Jedi always in pursuit. He chose saving his wife despite what was asked of him. .
A premeditated attack in destroying the Jedi was the only way that he and his family would he safe, despite the murderous rampage he went on, despite countless Jedi he struck without mercy. This was done all out of love for his wife and child regardless of how reckless and insane it looked. To gain the darkside power that he needed, it would require doing things unspeakable to his former self, including killing younglings, young jedi who couldnt even protect themselves. He straight up murdered people out of love, that right there is sadistic, but again, understandable, doing whatever it took to protect those he loves no matter the cost to himself.
What would you do in the same situation? Would you knowingly let your kid and wife die, knowing there is a power out there that would allow you to stop that from happening? Would you sacrifice 'love' for the Jedi ways? Ultimately we see the path he took was the wrong one, because he ended up losing everything, and at that point was left with nothing with anger and pain. He was left with agony and less power than he had before, basically a crippled version of himself, a pawn of Palpatine, a puppet, exactly what the Emperor wanted.
Darth Vader was created out of love for his wife and unborn child, two people he refused to lose and ultimately everything he did made him lose that and more. But without knowing the events that happened after, would you take that route? Would you do horrible things to keep your family alive?
Anakin sacrificed everything for love, wouldn't you do the same? Would I go on a murderous rampage? I dont know, I would like to think I'd do whatever it took to keep my family alive.
In the end Anakin lost it all because of where he placed his trust. Trust and desperation put him in an awkward place emotionally to where he couldnt think normally. He was put in a situation with no clear choice except to save his wife and unborn baby. A difficult choice that he lived with for the rest of his life.
So what would you do? You need to decide right now. Do you choose Family or strangers in a powerful group that you believe has turned against the Republic, something you sworn to protect? You decide. What was he supposed to do?