Holy cow, I wrote a book!
I don't know why the Close button went to the upper right
instead of going to the left of the other buttons,
but I'm going to guess.
(That's what I do around here most of the time anyway;
I just don't usually call it out.)
The corners of the screen are very valuable,
because users can target them with very little effort.
You just slam the mouse in the direction you want,
and the cursor goes into the corner.
And since closing a window is a much more common operation
than minimizing, maximizing, and restoring it,
it seems a natural choice to give the close button the
Besides, maximizing and restoring a window
already have very large targets,
namely the entire caption.
You can double-click the caption to maximize,
and double-click again to restore.
The restore even gets you a little bit of Fitt's Law
because the top of the screen makes the height of the
caption bar effectively infinite.