Go back every time? Now wait a minute, in the game it's never mentioned that she, or he in this case, goes back to Ganondorf everytime after she teaches a song to Link. Now in the OoT manga yes, it is implied that Sheik is pretending to be Ganondorf's lackey in order to prevent him from finding out his true identity, but that's not canon. It's just a story that was made to try and explain certain things that occurred in the game, but like I said before, it's not canon.
Anyway, personally I believe that Sheik spent time in hiding around Hyrule waiting for Link to return from his seven-year slumber and when he/she saw that he had returned, s/he found it necessary to help Link on his quest and try to point him in the right direction in order to stop Ganondorf. The reason being for Sheik disappearing on Link everytime after s/he taught him a song was because if Sheik were to say around too long and be noticed by Ganondorf that he would suspect that Sheik was Zelda and would've captured her then and there. S/he instead disappeared in order to prevent him/herself from being caught before Link awakened all the sages. Once all of the sages were awoken, s/he found that it was time to reveal her/his true identity to Link and fully explain why she was like that.
Not to mention that the main reason why Zelda never truly left Hyrule was because she is it's princess and future ruler now that her father is more than likely gone. She felt a duty to her people to help and guide Link to save her people, knowing that only he could stop him, instead of just leaving Hyrule and it's people to Ganondorf's wrath.
I hope that explains things a bit.