You have to stop viewing the apps from a technical perspective. App Review is _intentionally_ non-technical, as frustrating as that is for us developers. They enforce App Store policy from a non-technical standpoint
I produce an app which can download and run code, and was rejected many times through App Review. I was able to point to many other apps which _technically_ also downloaded and ran code — but the difference, to App Review, was entirely in the appearance (my code was text based, it "looked like code" and not like Scratch's visual programming, or nodes, or whatever)
I disagree with the App Review decision in this instance, but I think they are enforcing policy consistently. It just looks random to those of us with enough technical experience to look past the visuals and to the implementation
Please, no, this is not how security and sandboxing works at all. Otherwise, the moment you have an arbitrary code vulnerability, you'd get full access to everything.
The way effective sandboxing works is by giving a process a set of capabilities/permissions, what have you, that is enforced by the kernel. Those permissions can be "can I open files", "can I talk to the camera subsystem", etc. Then, even if you somehow manage to generate the right function call at runtime, the call will fail. And to be clear, this is how apple's own security works.
This isn't true. You can sandbox arbitrary machine code by restricting the process it runs in (this is how seccomp works on Linux).
So how is that different from iSH? Apple has approved a bunch of apps that can go get third party code and run it.