Apparently over the years the definition of "Walled Garden" has drifted a lot. The iPhone has a "Walled Garden", unless you jailbreak, it's very difficult to run anything outside the App Store.
My Mac? Almost nothing I run is from the App Store. Nothing needs to be from the App Store. Most of what I run doesn't even go through Gatekeeper and it certainly never touches software I build or compile myself.
If a "Walled Garden" can be disabled by bypassed by a single entry in your hosts file, by running from the command line, or any other number of ways, it's a damned short wall around that garden.
Lots of valid criticisms of MacOS, but it's nowhere in the ballpark of a walled garden.