I don't think that you have to use Apple toolchain, it's just way way easier to do so. I think there was some linux toolchain that you can use to build binaries for iOS.
On a non-jailbroken devices you will need to sign your binary with Apple's help but on a jailbroken device you can install whatever you want. It's also perfectly legal.
Besides, some hacking companies manage to install their malware on non-jailbroken devices.
There is no 3rd-party toolchain that you can use for a complete iOS (or even MacOS) build. Even if you cross-compile the majority of your code, you will need to transfer the binaries to a Mac for code signing. Everywhere I've worked that has produced Mac builds has had at least a small cluster of Mac machines to perform code signing. (But usually at this point, you just give up and perform the entire build on the Mac cluster.)
On a non-jailbroken devices you will need to sign your binary with Apple's help but on a jailbroken device you can install whatever you want. It's also perfectly legal.
Besides, some hacking companies manage to install their malware on non-jailbroken devices.