Hi!
If I understand correctly, when the menu bar is visible, macOS will force any window down below it. It's not something one can do about it, as far as I know.
However, when the menu bar is hidden, or on secondary monitors (i.e. one that don't have a menu bar), a window can be placed above the top programmatically (but it's not possible for a user to drag it there).
The reason the Emacs code checks if spaces are enabled is historical. The original NS code in Emacs 23 didn't support stretching a frame across two monitors (whereas Emacs 22 supported this). When this was fixed for Emacs 23 the maintainer of the time, Jan Djärv, decided to retain the original behaviour when spaces are enabled (since a frame can't be stretched across multiple monitors). Maybe this is something we could revisit now. (One thing I'm curious about is if it is possible to hide the menu bar and place the frame above the top of the display, if spaces are enabled -- I suspect that it's not possible but I haven't tested.)
-- Anders