Lord Vishnu has taken many avatars as a human being. During his avatars like Ram and Krishna, he went to Gurukul (school) like a normal human goes. Now being an avatar, he already has all the knowledge then what is the reason that an avatar needs to go to Gurukul and learn like a normal human?
The avatar of god, though The avatar is a god, he took it in form of human being, so God can't do violation of the modesty of a human being, The avatar has been taken for particular purposes, not for destroy the sinners or monsters.
If The God wants to destroy sinners or monsters, then he can perform from where ever they are, no need to take avatar on earth, but not only for Destruction of monsters, but To meliorate the society, show a true path to the people and many these kinds of reasons, God takes avatar.
God Knows that further the people will follow me and my deeds, so The Avatar Of God goes to GURUKUL(school) and shows, the importance of an education that Even a god has to go GURUKUL to be a mature or better person.
This shows the power and importance of an education, that the education is very important to get better Sacrament and to be culture person.