The stats are calculated. It's not physically possible to make the game give higher stats than effort 255 and IV 31 would allow. There are already game checks for illegal possibilities, but they *can't* exclude legal but unlikey "super pokémon" such as one with all IVs at 31. Heck, I've managed to breed several with IV totals over 160 or with three stats at 31.
The latter isn't as hard as it might sound, as three stats are inherited from the parents. If both parents have two stats at 31, chances of a baby with three at 31 is quite good (certainly much better than wild chance).