If it were that easy to undo, the programmer would bother doing it - I'm not talking about the company using obfuscation to protect its IP. At best only makes it a time consuming process to reverse engineer code so the idea is to make it annoying for a company that replaces you.
My brother did it to all his code when he realized the company he was working at was trying to save money by having him train what would be his replacement. Companies that don't have good version record/backup practices are particularly vulnerable. I usually see it in code from lower paid programmers out of india or china but this sort of thing does happen, not frequently heard of happening in large well known companies, but it happens.