I believe that her ego did the job there. It became clear that she would #1 position in few months, so she decided to retire before it happens. She wanted to protect her legacy. Losing to Safina and Schiavone was too much and those bakery products served by Serena and Masha...
I wasn't that surprised when she retired the first time, I saw that coming after the disaster against Serena in Miami. I think she simply got fed up, with her physique (and mindset!) she had to work unbelievably hard to achieve what she did and had pushed herself too far.
Anyway, I think there are even more suspicious examples in tennis today.
Justine retired the first time because she was sick and tired of tennis and her results got worse and worse. I can also sense some private problems adding to that, but basically because she was fed up.