While I’m sure Apple is not ecstatic that people use Apple devices for porn via browsers, there is no other practical option for Apple. The internet is too vast and wild. But a closed app ecosystem is small and manageable by comparison, so control is an option in that case.
And there are important distinctions between visiting a porn site with a browser vs downloading a porn app. A website exists independently and generally has no affiliation with any device/platform, neither in social concept nor in a technical way. It can generally be accessed by multitude of browsers and by a multitude of devices. An app however is much more closely associated with its device/platform, both technically (lives on the device, usually deeper access/integration to hardware and OS, often uses platform-specific design language, etc) and in social concept. You will hear people say, “download the (eg.) Yelp iPhone app” and the app will look and act like it belongs on an iPhone. You will never hear anyone say, “visit the Yelp iPhone site” because that wouldn’t make sense.
So an app is both more personal to the user and to the device. This association is significant if the creator of the platform believes the thing being associated is detrimental either to the creator’s/platform’s image, or to its users, or both. And if they believe it’s detrimental to their users, and they have a way to control it, then it’s understandable if they feel they have a responsibility to restrict it on their product, even if in this case porn is still accessible via browser. For Apple, it could be less about keeping porn from their users in the practical sense, and more about not condoning porn by allowing it in their App Store, since that is very direct access and within their control. And who knows, for some people, having a dedicated porn app may cause them to look at porn more than if they had to go into a browser and find a bookmark, etc. (I think that is true for social media apps for many people so it reasonably stands to be true here too), so there may be measurable practical results to the restriction as well.