He was cursed, because he was looking at Nee in the girls' changing room and wanted to get in there to see her. Some succubus-looking-girl gave him that wish...every time he saw Nee and got excited by it, he'd turn into a girl.