Still better than Windows, where it just takes up your whole screen.
The different behaviours are confusing and difficult to remember, and not only goes against user expectations but isn't user-configurable.
The green button in almost every case just resizes the window to the optimal size. Whereas the maximise button simply wastes most of your screen estate (which, bizarrely, many Windows users think is actually taking advantage of their large displays, whereas its really doing the opposite).
For varying values of optimal including "not optimal in any way for any user in any situation"