> why should I not be able to do so on my phone?
Strictly speaking, you can. Enable developer mode, connect your phone to your Mac (you need a Mac), and you can build and install whatever code you want.
Asterisks being that your phone will uninstall it after a while I think, and you need to create a free account for Xcode.