It wasn't an absence of a market. Those of us that had to manage OSX Server soon found out the software was marked by several high-profile bugs, technical debt, and a perceived decline in reliability. I migrated a large number of Macs to Ubuntu Server software. The hardware was great.
I fear the quality of macOS is deteriorating today in the same manner than befell OSX Server.
Right, but I could see an alternate timeline where OS X Server took off, and within a decade took a path similar to Windows Server (pared down services, headless flavor, etc)
I am not sure iOS popularity would justify macOS as a server. What would be the use case? It's not app development; that is done just fine on the standard desktop macOS. It's not backend; that is done just fine on Linux servers, even in Swift if that's your thing.
https://en.wikipedia.org/wiki/Mac_OS_X_Server