They don't "allow" it, but most apps that need background execution just ask permission for geolocation tracking and pretend to use it, for example iSH[1]. There are a few activities that the app can do to prevent itself from being suspended when it goes out of focus, like playing sound, geolocation etc.
And you're at the mercy of Apple deciding to remove your app for violation of the terms when it gets more popular. This is what the EU wants to fix with its new directives that level the anticompetitive playing field.
Apple can remove your app for whatever reason anyway, pretty sure every single company has that clause buried in their ToS somewhere. It's not like they constantly exercise it, but it's more for "just in case we really want to"
Sure, but "they were abusing permissions to keep their app burning your battery" sounds a lot better for Apple than "it was competing with Photos too effectively".
One of the big differences though is iOS apps can only be provided by Apple. If the google store policies restrict you, you're free to distribute the app yourself. There are well known examples of this. Telegram from the play store blocks adult content its aware of. They also distribute an APK on their website without that if you want it.
Apple doesn't allow background execution for third party apps. Can't increase service revenue if you allow competition.