***=Spoiler Stuff***
Catra arguably already killed herself in S3:E5. While one may argue that the entire fantasy exists only within Adora's memory, it's not really clear whether any of the characters remembers exactly what happened. In S5:E3, I think she's aware of what's going to happen to her -- she's seen what Horde Prime does -- but she just doesn't care because she's already redeemed herself by saving Glimmer. Or, more accurately, she's sending Glimmer back to Adora because they mean something to each other, and she feels she's worth nothing.
Shadow-Weaver's suicide isn't altruistic, but I see it as the ultimate expression of her victory. Villains are not redeemed: they can only prevail and, as complex as my theory might seem, here's why Shadow-Weaver wins.
Her identity is focused on winning: every fight; every argument; every moment. But she's smart enough to see that Adora cannot focus if Catra's in danger, which jeopardizes the entire plan of sacrificing Adora to release the failsafes around the magic. If she is to become the most powerful sorceress in Etheria, she needs a back-up plan.
And that is to absorb as much magic as she can from the Heart of Etheria, and then go out in a blaze of glory.
This is the only way to give Adora a chance to trigger the failsafe and give Horde Prime the middle finger. All goes according to plan: Horde Prime is defeated; and Shadow-Weaver becomes, if only for a brief moment, the most powerful sorceress in Etheria. It's not too late for her because she can't change; it's too late for her because she won't, and she will pay the ultimate price for it.
"You're welcome."
Some villains will never change, but are brilliant enough to remind you of exactly how dangerous they can be. Shadow-Weaver warned everyone about the Horde. She cast the Spell of Obtainment that allowed her to absorb the powers of others. That power allowed her to steal magic from the Heart of Etheria. And that act saved Etheria.
Shadow-Weaver wins because she ultimately gets everything she wants.
The writing of the show is absolutely brilliant because we're both right.