The same engine (WebKit) is available on all Apple platforms. One can also build a desktop browser on top of WebKit like DuckDuckGo suggests it may do on macOS. This approach has a tremendous advantage for solid platform integration and allows them to focus on building a good user experience (and, in this case, secure* good user experience).
It basically only lets them do a bit more than skinning it. No deep plugin architectures like you see with Android Firefox, allowing real ad blockers.
It is also possible to extend the content blocking feature, so it also works in Safari itself through a regular web plugin or a content blocker extension. DuckDuckGo offers the "DuckDuckGo Privacy Essentials" plugin for iOS and macOS, blocking all kinds of trackers.