Mountain Lion always switches to previous application at wake up
Thanks Daniel Lawson for pointing to the solution:

The issue is cause by the 'require password after sleep or screen saver begins' option in the system security settings. If you turn this off, the issue disappears.