A short history of the Mac menu bar
The original Macintosh of 1984 placed a menu bar along the top of the screen, with an Apple menu on the far left. Unlike Windows, where menus live inside each window, the Mac bar belongs to whichever app is active and always sits at the screen edge.
There is a practical reasoning behind that. A target at the edge of a screen is easy to hit, because the cursor stops there, so users can fling the pointer upward without careful aiming. Interface designers often cite this principle, known as Fitts's law, as a reason the top-edge menu is efficient.