Would you still have sex if it wasn't fun? If it was as enjoyable as weeding the garden? It would become a chore, something that you'd put off until you couldn't avoid it any longer. Many people wouldn't bother at all, and some would even argue that it wasn't necessary at all. The fact is, that it is necessary to keep the human race going. If we stopped, we'd die out. That's why sex is fun, so we want to do it.
Would you still eat if it wasn't fun? If it was like going to the dentist? Would you put it off until your stomach hurt so much that you couldn't stand up straight? Eventually you'd eat just because you'd have to, and to stop your wife nagging about it. Again, eating is really important, and we'd die if we didn't eat. That's why it is fun. OK, so the preparing and clearing isn't much fun, which is why going out for a meal is such a treat: we get to do the fun part without the hard work. Some of my happiest memories involve meals.
When I want my children to do things, I try to make things fun. If I want them to tidy up, I make it into a race. I do it to myself too. If I've got a mundane, repetitive task to do, I'll liven it up by thinking of quicker ways to do it, or make patterns out of the whatevers, or trying different ways of doing it. If I make it fun, I'm less likely to duck out of it.
Fun is also how we measure things. If you think about your favourite teacher, it is likely that their lessons were fun. Some people hate their dull jobs sat in front of a computer every day, but go home and play on their XBox. It's still a computer, but it's fun.
So as a software developer, it would be a good idea to make the software I write fun. People would be less likely to avoid it if is nice to use. For example, as a programmer, I like solving the problem in hand with code. I don't like the monotonous stuff, so I use code generators. It's dull typing out mostly the same thing, but fun to write a generator script to spit it out automatically.
The same goes for the work environment. If is fun, then people would be more likely to stay. That's not to say that everyone should slack off playing volleycock all morning, but that the work, the environment and the atmosphere should be fun.
So, why do we want to do stuff? Because it's fun!