It's getting harder and harder for people to detect hacked pokemon in this Gen. I personally took the time out of my day (only about 12 hours to do it) to catch a really high IV Necrozma. On top of that, I caught it in a Beast Ball. Beast Balls have a really low catch rate but it made actually catching it all the better.
It's really unlikely that someone would go out of their way to catch one as you get a Master Ball around that time but its possible. Also, since it is Lv.100, what probably happened is they took their Necrozma to the Bottle Cap trader and used Bottle Caps to increase the IVs to perfect stats. So, I suggest (if you are wondering if it is hacked) seeing if it has the ability to learn, or knows moves it shouldn't be able to know.
Just thought I would mention that it is most likely legit.
"I can see now that the circumstances of one's birth are irrelevant... it is what you do with the gift of life that determines who you are" -Mewtwo