The purpose of a locked boot system is privacy. A MacBook is a less secure device, and one that’s been rooted and had linux installed is basically open season for any attacker. An iPad trades off the ability to put some other OS, for fairly close to total security. State-level enemies can torture you or run expensive intrusion software… and Apple improves the defenses against the latter every time. Now it reboots if it hasn’t been used in a while, say sitting in an evidence locker.
Boot loader aside, you can write code on an iPad.
There are plenty of code editors, interpreters, and several of them have compilers. The premiere one is Pythonista, but I’m also fond of LispPad (R7RS Scheme). There are a few “linux in a box” things like ish, which give a full shell in a sandbox where it’s safe.
I wasn’t able to find any pico or nano apps, but there are several Vims and emacsen.
The locked bootloader is having a lock at all. Without that, anyone can enter at any time.
In reality, home door locks are merely suggestions, they’re trivially picked or broken open, windows can be entered through. But if you DID have a secure building, you wouldn’t want any of the security systems to be replaced.
You get full access to operate in a secure building once you’ve used the key/biometrics/passwords/interrogation. You don’t have access to replace the locks with tinkertoy homebrew shit, because we know that’s not as competent.