If you modify and upload Pokémon to Sun and Moon, you're gonna have a bad time.

The Pokémon Company has banned 5,954 Pokémon Sun and Moon players for wrongfully hacking the game and altering their save data. Digital Trends, who got the information from Serbii, reports that players have been editing their save data to add "hacked Pokémon that were either not supposed to be in the game, or were added through unconventional means." (Digital Trends)

Pokémon Sun and Moon

This ban prevents [players] from using Game Sync, entering in Rating Battles and Battle Competitions, and participating in Global Missions. When they try, they will get an error message with the error code 090-0212. (Serbii)

It is entirely possible that these "illegal" Pokémon may have been unknowingly received in a trade, and though Kotaku reports that the majority of bans are targeted at those creating "illegal" Pokémon, just be careful when trading with strangers so that the might of the ban hammer is not brought down upon your head.

This on the heels of many Pokémon Go players being banned for using bots that spoof GPS and take all of the actual work out of playing the game.

TL;DR: DO NOT hack a Pokémon game or the Pokémon Company will come down and you hard.