Let me retell this little bedtime story from a different perspective.
After Hillary lost in 2008 she realized she needed to work harder and do a better job of connecting with Democrats if she wanted to win in 2016. So she took a job with Barack Obama, worked hard to demonstrate her capabilities and skills, and spent the next eight years building relationships with other Democrats and with Democratic interest groups, listening to their needs, working to advance their goals, and doing all the other work you do to build a coalition and show somebody that you're worthy of representing them in the party.
And it worked! By dint of her hard work, extraordinary preparation, and dedication to progressive principles, she managed to convince basically all the other Democrats in the party that she would be an excellent candidate for president next time around. She was so effective at connecting with people that it was hard to even find a Democrat who wanted to run against her. Nobody wants to run a campaign they'll lose, and everybody knew she was so popular within the Democratic Party that it would be nearly impossible to beat her. Even the sitting vice president decided not to run when it became clear that even Obama had been won over to supporting Hillary after working with her for four years.
Now, which part of that specifically was unethical?