My Galaxy S7 just reset itself today on the way home from work. One minute I was texting, the next minute it had a black screen and said reset then the little android man showed up and screen said ERASING!!!! I had to set everything up like brand new, I’m so pissed!!!!!!!
Unless you hit specific buttons in a specific order that should not happen. Unless, of course, there was/is something on the phone that could reset it on you. Virus, malware, spyware, remote wiping software, etc.