To understand the world around us.
To make people's life better
To make money
But most of all, in my opinion:
To leave something behind yourself.
Curiosity, empathy, greed. All of these are engines that are pushing humanity towards. But no matter how smart, rich or influential you are, you'll die one day, just like everyone else (okay, this might not actually be true, but let's not complicate this for a while) and you face the same existential problems.
You raise many children? Four to five generations to the future and nobody will know who you were.
You write a great book? Unless you're a Shakespear-level author, nobody will remember it in a few hundred years (in the better case)
But if you uncover a great mystery of the universe, your name will stay alive as long as humanity does.