Harry decided not to save anyone, because it was against his rational self interest.
Voldemort won, and rightly so, as his ethical egoism allowed him to value his life above all else.
Harry decided to save everyone else, and it was because of his rational self- interest. As much as we’d like to believe otherwise, it can serve as a motivating factor in a variety of decisions. Rooted in even the most altruistic acts are glimpses of self-interest. Feelings of satisfaction and personal significance can be factors in why one decides to act altruistically. By defeating Voldemort, Harry made the wizarding world not only safe for the people he cherished but safe for himself.
I know it has become incredibly unpopular to enjoy and support the works of Ayn Rand, but Anthem will forever be one of my favorites books.