What goes on in someone's mind that says: "Maybe if I spend some time making my source code hard to understand I can better preserve my job." ?
In reality all it does is slow them down, waste their time and lead to the firing of the developer. (At which point we get to hear funny stories from people like jacquesmatteij)
If that time was spent improving/refactoring their code and working on new things, they'd actually have the job security they were so desperately seeking.