There have been many instances of this occuring. Such as Lance's Dragonite at LV 50 when it evolves at LV 55 in the Elite Four in Hg/Ss. GameFreak did this for one main reason.
They wanted to make the game more challenging.
GameFreak does this with every game, they just do it to make the game more difficult.
That's how Gamefreak desighned the game to fight Ghetsis.There's no explination to say that the game is glitched. (HOPE THIS HELPS!) :)
How to change your username
How to add a user avatar
Why was my post hidden?
Flags vs Downvotes
Official PokemonDb League
Type a Pokemon name, type, move or ability to see instant results.