I thought the same thing about Orochimaru. Also him taking Anko as his student would strengthen the relationship between the 4th and Jaraiya. Similar to how Kakashi focused on Sasuke and Naruto trained under Jaraiya. Just because she was Orochimaru's student doesnt mean she wasnt on the team with the 4th before that.