Because Docker is basically a user interface for Linux's built-in API that is unique to Linux. All the heavy lifting of process isolation is done by Linux itself, not Docker.
Adding the same interface to other operating systems would require extensive changes to their kernel. In the closed-source macOS that is not feasible. Apple doesn't give that level of access to anyone.