Very different games but very similar bittersweet endings, which I both love very much.
In Prince of Persia (spoilers obviously), the Prince revives Elika by setting big bad god of darkness Ahriman loose again after spending the whole game trapping him, basically dooming the land because he couldn’t live without Elika.
In the Last of Us, Joel spends the whole game getting Ellie to the fireflies only to break her out and take away humanity’s only hope for a future, because he couldn’t live without Ellie (even the names are similar actually).
Both main characters had the realization last minute that the person they had grown to love over the course of the events of the game had to sacrifice themselves in order to (possibly) save the world.
Both characters decide they can’t live without their companion so start fucking up everything they worked so hard for. It’s love and it’s selfishness, it’s heroic and it’s tragic, but what makes these twists so good above all is because their choices are completely understandable.
Both games also make you act out the choice yourself as the player, which only adds to the power of it.
I might also add that in both stories the companions are both very much willing to sacrifice themselves for the greater good, and are greatly disappointed when we don’t let them make their own choice, which makes it all even more conflicting.