Heres the thing, the name of the game IS MINECRAFT. Yet you can survive and play for hours without mining... You can play on peaceful and surviving isn't a problem... You could go without building anything, you'd just live in a cave. :] If theres other good answers in the replies i'll add em to the poll.
Well, the title says main goal OF minecraft, so this is what I think:
I think the purpose of mine craft was to fulfill our fantasies of having the world how WE want it. No big buildings and corporations unless we allow it. I think Notch thought that an alternate reality that simulates the world millions of years ago would be perfect to let us fulfill these normal human fantasies.
Now the poll says the main goal IN minecraft, and I think that the main goal in minecraft is to do whatever you want, and enjoy doing it/be satisfied doing it.
When I play, my main goal is to gather bounties of resources so I can build things. With this there is definitely an aspect of survival, and you can't gather resources without mining.
So, really, all of the above.
IMO it's a means to display your creative juices! It's like virtual, unlimited Lego. At least that's part of it. There's also the game factor of it where there is a challenge to "beat" the game so to say by killing the ender dragon and wither. To add to that, the purpose of the game isn't to mine or build or craft, all three are used to paint your creativity on a 60,000,000 block square canvas!