Joy of making things
Writing a code that works and which can do some bunch of stuff has always delighted people. It's like creating new things from scratch and it's you who shape it. This gives you 'God' like feeling in a way that you are the creator and destroyer of the code you are writing, and it's always joy in making new things be it a software or some clay toy.
Making things that are useful for others
The idea that the software you have written will be used by hundred's or thousand's of people around the world is delight in itself.
Creating something that will make life of other people simple and help others makes you feel good for sure, and you can go to a good night sleep(guilt free) thinking that you have done something awesome today which is obviously the best feeling.
Puzzle solving has always fascinated people. It's like interlocking lego parts and watching them work together to form complex structures. Programming is also somewhat similar. Writing code snippets that join together to be part of more advanced software is exciting. Challenging your brain to solve real world problems considering all the use cases and coming to a solution is fascinating
Joy of always learning
Another thing that has attracted people towards programming is learning new things at a very high rate. Technology industry is changing rapidly and every day new big thing is on the plate. So everyday you are learning something new, whatever you might have learned a year ago is already stagnant (doesn't imply that it is useless, just old) and you need to keep evolving everyday. This has attracted lot of individuals towards technology industry as everyone likes learning new things each day.
Delight of working in controlled medium where programmer is like a poet
We have always heard the phrase coding is like writing a poem where you mimic yourself as poet, and writing code that is beautiful and works at same time. A code that doesn't require documentation, comments and is self explanatory is a beautiful code and we every day try to get better and write such code. Trying to achieve this perfect world scenario like a poet we everyday get better and better.
Programming is fun because it let's you implement your creativity with minimum resources.
[Source and inspiration from book: The Mythical Man-Month ]
If you have anything to say why you like programming let us know in comments.