Earlier quoted context omitted.
I've never figured out what the green button does besides make the window larger and randomly sized. I always figured there was something that the size was tied to but never invested the time in figuring it out. I use SizeUp and never click on any of the buttons now anyway. I do miss Windows for this functionality.
Most programs I use, the green button causes the window to go full screen and switch to another desktop. But double clicking the title bar in Safari, for example, sets it to what seems to be an arbitrary width and maximized from top to bottom of the screen. I don't know how to get it to fill the entire screen without switching to another desktop.
For something like Safari, there often isn't a single sensible content size, so it ends up just trying something reasonable for the width.