I think the above post must refer to how it works in MacOS. In Gnome, the app quits when the last window is closed (by default at least).
I guess this is a matter of taste, but personally I strongly dislike the way MacOS works here.
This is not a macOS issue, it’s an app developer issue. If the app developer likes the behavior that the app still runs after closing the last app window, this is how the app will act. Some newer Apple apps close the application when the window is closed.
This is the appropriate behavior if and only if the app has only one “main” window (e.g., System Preferences).
So then why is it so common on MacOS?
because that’s how it used to be on older versions of OSX and older Macs. There’s a lot of inertia because launching a program to read files off a disk and load them into memory was more costly timewise in those days so e.g. having Photoshop open and loaded even if you didn’t have a picture open you didn’t want to have to wait for the program to open unless you really were done with photo editing.
Oh... :/ I guess when I read that I interpreted it as being directed towards people switching from macOS to Gnome. I haven't booted into a system running Gnome in a while...
If I remember correctly, in old UNIX desktop environments apps still ran after closing the last app window.
In fact that’s how it always worked. Apps that don’t work that way, including Apple’s, are “wrong”.
Both behaviors have been common/"correct" as long as I remember. Single window apps such as System Preferences, Disk Utility, etc. don't meaningfully exist without their window and as such they quit when the window closes. Multi-window apps e.g. web browsers, word processors have the "usual" macOS behavior where they can remain running without a window open.
Importantly, both behaviors are correct under the appropriate circumstances (which you described). It’s not random or discretionary.
To switch the app/window closing behavior…
there is an API for that.