Speaking in general, one reason not to use macOS for servers is that the macOS kernel does not provide all of the necessary APIs for containerization.
A container is a combination of a restricted filesystem (e.g. chroot), separate namespaces (e.g. pids, network, ipc), and resource limits (e.g. cgroups for max RAM and CPU usage). It is a big undertaking to modify a kernel to provide these capabilities.
A few operating systems have these APIs (or something similar). The ones that I know about off the top of my head are: Solaris Zones, FreeBSD Jails, Linux containers, and Windows Server containers in Process Isolation mode.
The macOS kernel simply doesn't provide these APIs and I doubt that Apple is really interested in putting in the substantial effort to develop them.
They don't need Linux style containers, they control the OS. The Linux container situation is just a hack around the general API instability of the Linux userspace, a problem macOS doesn't have.
For inferencing workloads they also don't need to control max RAM or CPU usage as they can just dedicate the entire machine to handling requests.
And for sandboxing, Apple's sandboxing infrastructure is actually the best of any OS (but mostly private unfortunately).
If you don't mind me asking do you know if they intentionally removed support for containers? The closest cousin FreeBSD seems a lot more friendly in terms of support
Plus a lot of devs use mac is it not a large enough addressable market for apple to care about the servers
I'm honestly not really sure how it went down. It's possible that XNU (the macOS kernel) was simply developed before FreeBSD Jails were developed, and they never put in the engineering effort to port over the feature. I don't think there's a fundamental reason why it wouldn't work.
For devs, I think that most devs are okay with the current practice of running a virtualized Linux (or other) guest via Docker and deploying to Linux (or other) servers. macOS does support virtualization. The difference between virtualization and containerization is that a virtualized guest uses its own kernel whereas a containerized guest shares the host kernel.
I'll also point you to two comments in this old HN thread which seem to have good information about Apple's use of server operating systems:
A container is a combination of a restricted filesystem (e.g. chroot), separate namespaces (e.g. pids, network, ipc), and resource limits (e.g. cgroups for max RAM and CPU usage). It is a big undertaking to modify a kernel to provide these capabilities.
A few operating systems have these APIs (or something similar). The ones that I know about off the top of my head are: Solaris Zones, FreeBSD Jails, Linux containers, and Windows Server containers in Process Isolation mode.
The macOS kernel simply doesn't provide these APIs and I doubt that Apple is really interested in putting in the substantial effort to develop them.