For all of Apple's major flaws and the absolutely infuriating lack of access to literally anything but what they give you on stock, there are reasons for why they do it. Just.. not enough good ones to convince me to use Apple products, lmao.
A lot of what Apple does (aside from trying to keep their works proprietary) can really just come down to device optimization. For example, it's MUCH easier to design, plan, and optimize an Operating System if you know it's only going to be run on very specific hardware. Since that removes a lot of the guesswork when it comes to designing software to be paired with potential hardware it makes it much easier for the official developers to create a smoother and more tailored experience for their own products. But that doesn't really excuse them for not allowing users to access, much less modify their own devices - whether it be physically or via soft-modification.
Android while it offers more customization in the aspects that Apple doesn't, has a lot of the problems that IOS doesn't because of the earlier stated reasons. Android (generally) isn't made with any specific hardware sets in mind (unless it's tailored by developers for their own purpose, e.g Samsung [They're basically just the Apple of Android atp though]). So by only covering the bare-basics it becomes much harder to make a smooth-running OS across the endless variation of hardware dependencies.
The same that's said of Android could also be said for Windows. You could make an absolute monster of a PC, but that doesn't mean that Windows would be properly optimized to your system, since once again - it isn't made with specific guidelines in mind. It's just made to work as broadly as possible. Which a lot of these optimization issues could be fixed INCREDIBLY easily by allowing users access to their own systems to properly optimize them to their needs.
But sadly corporations loveee their proprietary works, so I don't really see that happening for a lot of things.