When we first meet her, she's trying to kill you, and she winds up getting set on fire twice and falls out a window. When we meet her again, you wind up defeating her (but not killing her) and stop her from offing herself. She later shows back up during the scene enroute back to Mother Base when you thought she escaped (she just turned invisible) to bail you out, and apparently she was intrigued as to why Snake didn't just off her before and decided to return the favor and saved him from getting killed, being so intrigued afterward she willingly returns to Mother Base with Snake to find out more.
Despite pressure from Kaz, you don't have her killed, and with Ocelet's encouragement, she later winds up an ally. As the game progresses, Snake's continual show of humanity and mercy to someone who, by all rights, should have killed her long ago, winds up winning her over, which is why she's willing to die for you at the end of her game arc, because that intrigue turned into admiration which turned into loyalty which turned into love.
If anything, I think it made her death more meaningful in that she chose to die instead of allowing the parasite inside of her to harm a man she not only renounced any desire or obligation to kill, but she instead fell for him because he treated her as a person, ally, and friend despite the fact they should have been enemies and he had every reason to want to kill her before and had plenty of chances to do so beforehand.
IMO, that's some good writing, because it shows just how charismatic Snake is, and she chose to put herself in a refrigerator instead of allowing Snake to die because of the love that was born out of his continued loyalty to her.
She could have chosen to let Snake die and extend her own life, that was an option, but she CHOSE to give up her life for his out of loyalty to someone who had repaid the favor despite every reason why he should have killed her a long time ago.