The focus model in OSX is absolutely, completely broken. Unfortunately, it's not only a question of the window manager being woeful (although it is), but it has to do with the whole application/window philosophy required with a shared menu bar.
There are a few things I require from a window manager. The first is that I need to be able to move or resize any window from anywhere within that window by using the mouse and a modifier key. In OSX, this is possible using afloat, with some paralyzing limitations: you can only use it with Cocoa apps (MacVim, Firefox, and Finder don't seem to work), and you can only resize from the bottom right corner regardless of where you click. I've yet to find a better solution.
Secondly, I need virtual desktops. Happily, OSX added virtual desktops at some point (and proceded to take all of the credit for it), and it's somewhat easy to make the keybindings for them fairly sane. Unfortunately, there's no way to move windows between spaces without using the mouse, which makes it almost completely useless.
But I can live with the limitation that moving windows from desktop to desktop is difficult; I can get into the habit of carefully setting up each space for its particular purpose. However, when you switch between spaces, the current application's windows gain focus. So if you have a terminal open on all spaces, and you focus a terminal in one space, then switch spaces, the terminal gets focus and comes to the top. Worse, sometimes windows gain focus but do not come to the top, which is extremely confusing for an OS that does not have focus-follows-mouse.
This makes it extremely difficult to use spaces at all. Even my meticulously set up space, with windows layered just as I need them, maximizing the visibility of important information, gets trampled when an application focus event brings all of its windows to the top. Virtual Desktops work best when they encapsulate different activities, but spaces are a veneer on top of OSX's application-centric focus model; in reality, OSX changes the focus on the other space to the terminal when you give any terminal focus on any space, not upon switching.
Conceptually, I don't find this model as a way of organizing windows to be particularly useful. If I want to focus on a single terminal, I don't necessarily want all of my terminals to cover everything else. Often, this gets in the way, and I've found myself using tabs (which I like less than windows) in order to avoid a bunch of terminals obscuring everything when I switch application focus between terminal and non.
Because spaces don't actually compartmentalize anything, if I click the chrome icon to open a new browser window on a pristine space that has none, it merely focuses the application, leaving me with a menu bar and no windows. If i click the icon again, a preference of mine switches to a space with an active window. Upsettingly, this is not just the behavior of the dock; using spotlight to "launch" chrome in this case does the same thing.
Some of these gripes are related to behaviors that I've learned in the linux world that do not translate well to OSX. But the focus gripe isn't one of them. The way it works in OSX has no redeeming qualities and is a constant frustration, even one month on.