Why is getaddrinfo considered a legacy API? I understand that you probably don’t call this when you write software on top of Apples frameworks but it is a pretty standard thing to call for “Unix” (for lack of better term) programs.
For quite some versions that modern networking APIs on macOS using Objective-C frameworks, starting in 2018.
See WWDC 2018's "Introducing Network.framework, A modern alternative to sockets".
NeXTSTEP might have been a UNIX, and macOS derives from it, but the whole UNIX story has always been to bring UNIX software into the platform, not to make it easier to move elsewhere.