Question S4 auto-reset after unlocking

Hello,
I just unlocked my S4 i337M with a code provided. Unlocking went succesful at first try.
After procedure, phone went to desktop for few seconds, but then started reboot, "erasing" message showed,
and phone reset to factory settings. It seems fine now, I setup wifi again and dloading all apps that i lost.
But never saw that or read about it in all tutorials. Phone's running latest Jellybean 4.3.
Did something go wrong? Any thoughts?
Thanks in advance for any comments.
gs4u