I think it's just stupid that POSIX programs don't always work the way you expect or are missing (e.g. umount -> diskutil unmount )
umount's still there, and it works the same way it does on other UN*Xes - i.e., if some program has a handle (file descriptor, mapped file, etc.) on the volume to be unmounted, it fails (unless you use the -f flag, to forcibly invalidate those handles and unmount the file system). "diskutil unmount" sends a "hey, could you please let go of any handles you have for this?" request before the actual unmount() call is done, and waits a while for "OK, I've released it" replies before it attempts to unmount.
Unfortunately, a lot of stuff in macOS holds onto those handles - and some stuff just grabs them for the lulz as soon as something's recognized as having been mounted - so, as the umount(8) manual says, "Due to the complex and interwoven nature of Mac OS X, umount may fail often. It is recommended that diskutil(1) (as in, ``diskutil unmount
(And it's not in POSIX; it's considered an administrative tool and UNIX(R) systems are allowed not to have it or to implement it as they choose.)