There's a pretty good discussion about the subject at IxDA: Hiding and Disabling Menu Items. This links directly a post by Joel Spolsky titled "Don't hide or disable menu items", stating:
A long time ago, it became fashionable, even recommended, to disable menu items when they could not be used.
Don't do this. Users see the disabled menu item that they want to click on, and are left entirely without a clue of what they are supposed to do to get the menu item to work.
Instead, leave the menu item enabled. If there's some reason you can't complete the action, the menu item can display a message telling the user why.
I guess that explains the behavior on the Stack Exchange sites.
In the end, I believe it all boils down to error prevention vs. error recovery, i.e., should we allow the user to make the "error" (click an inactive control) and recover with an explanatory message—or should the control be deactivated (or even hidden) in the first place?