The only reason I can think of is that your Togepi's friendship went down before you leveled it up. Togepi's friendship value needs to be at least 220 for it to evolve, according to you, it's friendship value was at the maximum, which is 255.
The only way a Pokemon's friendship can go down (In X/Y) is using a Revival Herb, Energy Root, Energy Powder, Heal Powder, Fainting, or Trading your Pokemon.
It doesn't matter if your Togepi was traded after it's friendship value was at maximum because once it is traded back it's friendship value resets to what it was before it was traded.
Having your Pokemon Faint is also highly unlikely because fainting causes it to lose only one point of friendship.
So that leaves us with using a Revival Herb, Energy Root, Energy Powder, or Heal Powder.
You would also have to use multiple of them because using a Revival Herb would bring down 20 friendship, Energy Root would bring down 15 friendship, and Heal and Energy Powder would bring down 10 friendship.
Seeing that Togepi's friendship value was at 255 and to be able to evolve, Togepi's friendship value needs to be at least 220, you must have lowered Togepi's friendship by at least 36, making it's friendship value 219.
You somehow lowered Togepi's friendship, go fix it.
Now if the above isn't the case and Togepi still has 255 friendship, it's probably a glitch. (Or something I missed.)
Hope this helps!