Let's be honest
Most of these criticisms leave out lots of details. I'm about to defend all the big companies, but if we truly think they're worthy of reproach, it is helpful to be honest in our complaints. They're guilty of a lot of things, but that doesn't make them guilty of everything.
First, in defense of Apple, your complaints against the iPad are no shell, no root, and no Python. You knew all of those things were missing when you bought it. If you don't like things where you don't get root, iOS has always been that. It would make a lot of sense if you refused to buy one and cited that as the reason. It's certainly one reason why I won't get an iPad, though I have grudgingly accepted it on an iPhone. Buying an expensive iPad and complaining that it runs the OS it always has seems a little confusing. Even without that, you've pointed out that you can, in fact, get a Python REPL and a shell, restricted though they are. For some people, that might be enough. If they are not enough for you, maybe it would have made more sense not to buy the iPad and spend that money on a computer where you can have the tools you need. If everyone thought that way, it would demonstrate what Apple needs to change to get people buying iPads. As it is now, they're going to keep making their locked down iOS environment because it seems to be fine for enough buyers, you included.
To compare this with an old Surface is not a fair comparison. Yes, Microsoft shouldn't be cutting off the hardware they are. They have no good technical reason. However, unlike Apple, you have three choices you can make freely with that Surface. You can bypass the hardware checks and install Windows 11 anyway, and it works, you can install Linux on it, with pretty good driver support, or you can install any other OS that is compatible with the processor. This is the benefit of having an open and standard architecture, and it is something that Windows machines have, Intel Macs had, ARM Macs don't really have but they are at least open, and iPads have never and will never have. It shouldn't be junk if you are willing to spend a little time on making it work, and if you can make productive use of PyTorch, you have enough skill to accomplish it. Oddly, I'm much happier to blame Microsoft for this than Apple (Microsoft at least did something bad recently to it whereas Apple didn't change anything), and yet, I'd still rather have that old Surface than the new iPad.