Recently many players of Pokemon Sun & Moon were reporting about a save game glitch that is causing their game to go back to scratch. The bug or glitch will restore the original games deleting all the progress of players. Sounds very annoying, finally Kotaku has an answer for the same. According to them the issue is because of a trainer, informally used by many gamers to boost up their marks high in the game.
— Kurt (@Kaphotics) November 22, 2016
Above you can see the official tweet which talks about the issue. So the glitch might be because of cheating in the game. Still ample of users are having the same issue, even if they are not using it. There is no official updates on the glitch, ample of users had tweeted on the issue already. The glitch as mentioned is triggered by the trainer that simply means if you are using the same for cheating in the game, your all progress will be restored back to zero.