From each individual series (and the new canon comics), each crewmember seems to have different reasons for wanting to join Starfleet:
To challenge themselves (Picard)
PICARD: The acquisition of wealth is no longer the driving force in our lives. ...We work to better ourselves ...and the rest of
Star Trek: First Contact
Because they were inspired to do so by a famous relative (Kirk, Janeway)
KIRK: Wait. Where you came from, did I know my father?
SPOCK PRIME: Yes. You often spoke of him as being your inspiration for joining Starfleet. He proudly lived to see you become
Captain of the Enterprise.
Star Trek (2009)
JANEWAY: Shannon O'Donnell inspired me when I was a girl. She had an influence on my imagination, on my goals.
SEVEN: I never realised genealogy could have such an impact.
JANEWAY: I wouldn't have become a Starfleet Captain if it wasn't for her.
Because of gratitude toward Starfleet (Tasha Yar, Worf, Data)
ISHARA: So Tasha took care of me. And when I got old enough, I joined the Coalition.
DATA: And Tasha did not?
ISHARA: My sister hated the cadres. Blamed them for our parents death. For everything. She refused to join. And she left [to join
Starfleet] as soon as she had the chance.
WORF: I was rescued from Khitomer by humans. Raised and loved by human parents. I've spent most of my life around humans, fought beside them.
SOONG: I gave you the ability to choose whatever you wanted. To do whatever you wanted. Why Starfleet?
DATA: It was Starfleet officers who rescued me.
SOONG: Ah. So you decided to emulate your emancipators, huh? How disappointing.
Because it seems a logical fit for their skill-set (Data, Spock, Michael Burnham)
FAJO: A military pacifist. What a marvelous paradox. Tell me - whose dreadful decision was it to enlist you in Starfleet?
DATA: It was ultimately my own decision. My skills seemed appropriate...
TNG: The Most Toys
SCIENCE MINISTER: You have surpassed the expectations of your instructors. Your final record is flawless. With one exception. I see
you have applied to Starfleet as well.
SPOCK: It was logical to cultivate multiple options.
Star Trek (2009)
MICHAEL BURNHAM: From my youth on Vulcan, I was raised to believe that service was my purpose.
And I carried that conviction to Starfleet.
STD: Battle at the Binary Stars
Because they feel that it's their destiny (Worf)
WORF: I ran away into the mountains. I was without food or water for three days. But there, in the caves of No'Mat, Kahless appeared to
me in a vision and told me I would do something no other Klingon had
ever done. After I returned to Earth, I pondered the meaning of his
words and wondered what lay ahead for me. When I was old enough, I
DAX: Something no Klingon had ever done.
DS9: The Sword of Kahless
To get away from other, less palatable choices (Chief O'Brien, Nog, Ezri Dax)
O'BRIEN: When I was seventeen, my father even sent a recorded audition to the Aldeberan Music Academy.
JAKE: (perking up) What happened?
O'BRIEN: I got in. It was the happiest day of his life. I didn't know how to tell him I didn't want to go. So two days before I
was due to leave, I went into town and signed up for Starfleet.
SISKO: Why is it so damned important for you to get into Starfleet? Why are you doing this?
NOG: Because I don't want to end up like my father [....] I want to do something with my life... something worthwhile.
SISKO: Like joining Starfleet.
DS9: Heart of Stone
EZRI: I guess I was so busy dreaming of ways to get out of that house... I never saw what was really going on inside it... what was
happening to Norvo... the endless humiliations... the constant
drumbeat of criticism... the way his heart was carved up into little
pieces. I should've seen it. I should've tried to stop it.
DS9: Prodigal Daughter
For humanitarian reasons (Dr. Bashir, Dr. McCoy)
VARGAS: I can see you've done that before.
BASHIR: Too many times. Funny. I joined Starfleet to save lives.
DS9: The Siege of AR-558
MCCOY (VO): With every new place we discover, comes the possibility of new solutions, new possibilities, new cures. It's a
funny thing. I thought I'd never leave Mississippi but it was there
that I lost my way. It took traveling across the galaxy to find it
again. A new sense of purpose.
Star Trek IDW #17
To see what's out there (Capt. Archer, Trip Tucker, T'Pol, Chakotay, Travis Mayweather, Dr. Phlox, Harry Kim, Simon Tarses, Hoshi Sato, Melora Pazlar, Paul Stamets)
PHLOX: Oh, nonsense. Nonsense. You're too concerned with human morality. I thought you wanted to learn about new cultures. Isn't
that why you joined Starfleet?
TUCKER: Why, of course it is. But I was brought up believing you don't play around with another man's wife. I don't think I'm ever
going to change my mind about that.
CHAKOTAY: They'd manage. Palaeontology was always my first love. It's the reason I joined Starfleet.
SEVEN: Why didn't you pursue it?
VOY: One Small Step
TUCKER: I don't get you, T'Pol. I thought you joined Starfleet so you
could interact a little more with humans. But it seems to me that ever
since we left spacedock, you spend all your free time cooped up in
your room reading that bible of yours.
PHLOX [OC]: I had meant to transmit this letter by now but the Valakian epidemic has been taking up most of my time. Working with the
physicians here has been quite fulfilling. I suppose it's the reason
we joined the Interspecies Medical Exchange, but I worry about falsely
raising their hopes.
ENT: Dear Doctor
TAYMON: I joined the merchant fleet so I could get into space, because I wanted to explore every quarter of the galaxy.
KIM: Like me with Starfleet. All my life, that's all I ever wanted to do.
VOY: Favorite Son
TARSES: I used to sit and watch the drills and picture myself
an officer. I knew it would make my mother happy.
PICARD: But you didn't do it.
TARSES: No... I was eighteen, and eager... the last thing I wanted to
do was spend four years sitting in classrooms... I wanted to be out
there... traveling the stars...I didn't want to wait for anything.
TNG: The Drumhead
HOSHI: What do you know about these Klingons?
ARCHER: Not much. An empire of warriors with eighty poly-guttural dialects constructed on an adaptive syntax.
HOSHI: Turn it up.
ARCHER: Think about it. You'd be the first human to talk to these people. Do you really want someone else to do it?
ENT: Broken Bow
MELORA: I dreamed about exploring the stars as a girl. And I wasn't going to allow any... "handicap," not a chair, not a Cardassian
station... to stop me from chasing that dream.
STAMETS: I became an astromycologist because of awe. Awe at the miracle of life.
I met Straal, and we formed a partnership. We would get to the veins and muscles that hold our galaxies together. We would find truth. And we were happy in our lab, then your war started, and Starfleet co-opted our research.
STD: Context is for Kings
Because they crave command responsibility (Michael Eddington)
EDDINGTON: You'd be surprised. People don't enter Starfleet to become commanders, or admirals for that matter. It's the captain's
chair that everyone has their eye on. That's what I wanted when I
joined up, but you don't get to be a Captain wearing a gold uniform.
DS9: The Adversary
To advance their career prospects in the civilian sector (Mortimer Harren)
HARREN: I signed on to Voyager because I needed a year of hands-on experience. It was a requirement for getting into the
Institute of Cosmology on Orion One. If we hadn't gotten lost in the
Delta Quadrant, I'd be there right now.
JANEWAY: Sorry to have delayed your career plans, but all of us have had our lives interrupted. That's the nature of space
exploration. It's unpredictable.
HARREN: Which is why I don't like space exploration. Stumbling from star to star like a, a drunken insect careening toward a light
source is not my idea of a dignified existence. Pure theory is all
that concerns me.
VOY: The Good Shepherd
Because of family connections (Tom Paris, Will Riker, Worf, Geordi La Forge, Tuvok, Deanna Troi, Wesley Crusher, Jake Sisko)
A large number of the crew appear to be 2nd and 3rd generation Starfleet personnel, referred to in Voyager as "Starfleet brats". Tom Paris, Will Riker, Worf, Tuvok, Geordi La Forge, Deanna Troi, Wesley Crusher and Jake Sisko are all examples of those who've been effectively pushed into Starfleet by their parents. Note that Jake, Wesley, Tuvok and Tom all eventually turn their backs on Starfleet when their life choices become incompatible.
VALTANE: Well, if you hated it here so much, why'd you join Starfleet in the first place?
TUVOK: I joined under pressure from my parents. But I've already decided to resign my commission once this assignment is complete.
The new IDW Star Trek comic series features a number of poster prints entreating people to join Starfleet. As you can see, the main thrust of the advert is the opportunity for exploration:
as well as other benefits of joining, such as the opportunity to, ahem, meet interesting people...