I’m not much into tennis but if you have that much talent then it’s always better to end on a high and be remembered as a legend than slowly wither and be remembered as a hasbeen
It is what it is. She has other things in her life that she wants to achieve, most of them don't involve sport, but sport has afforded her the opportunity to do what she wants. Good on her.