In high school, I had a friend who was very talented at Game Maker, and he could compile his games as executables and distribute them to us via e-mail. That's impossible on an iPhone.
But peak iPhone for me was a jailbroken device running iOS 5 or 6. Back then, everything was still Objective-C, which meant that every object could be introspected in the live system and swizzled which allowed for making tweaks to the actual system. You also had Unix underneath and could login to a bash shell and install a compiler.
But someone who learns to program Swift on an iPhone or iPad simply won't have a deep understanding of how anything works. Even if you pay the $99, it's still a rather unpleasant experience to program on iOS given all the restrictions.