It's mainly an issue of copyright. The company wants to make sure it owns the IP to every line of code you write. For example, if you do some work on the weekend they want to make sure they own the copyright to that.
Every company I've worked for had a clause in my hiring contracts. Some will enforce it more than others.
Here's some in depth discussion: http://answers.onstartups.com/questions/19422/if-im-working-...