I'm staying for the retirement cheese. I had a longer obligation to start with though, not being HPSP. I need 8 past my educational obligation.
I did the math and for my specialty (anesthesia) even without counting moonlighting while on AD or lifetime health benefits, to break even financially I'd have to get out and find a job that guaranteed me $450-500K/year for those 8 years.
Moreover, depending on my motivation and how I wanted to spend leave and weekends, my first three years out of residency I easily supplemented my .mil pay by $100-200K/year. Now, that's not something I can count on if I PCS someplace with a less convenient moonlighting gig, but now we're talking about a civilian PP job that guarantees me $550-700K/year over that period.
Those jobs are certainly out there, but the employment landscape for anesthesia is changing and most of the anesthesiologists pulling in $500K+/year are working long hours and/or supervising CRNAs.
The Navy isn't all bad. 100% my own cases. I don't supervise or direct. Those syphilis-ridden CMS wankers never show their evil faces at MTFs. At some point in the next few years FTOS fellowship spots will open up and instead of making $70-90 as a civilian fellow, as a FTOS funded fellow I'll make my full MSP-augmented $250K+ while still accruing retirement credit.
Have kids? Agree to stay for 4 more years and you can transfer your Post-9/11 GI Bill. That's a 4 year full ride worth $100-200K, depending.
The people who 'do the math' and get out at 17 years are either EXTREMELY highly paid subspecialists - think spine surgeons and the like - or they're doing the math wrong. An O5/O6 with 20+ has a retirement benefit that is objectively worth at least $1.5 million in today's dollars. I just don't believe there are many people who can get out and increase their AFTER-TAX income by $500,000/year for those three years AND save ALL of that extra money.
Beyond finances - another tipping point for me was moonlighting a lot my first three years out of residency. 5 or 6 days per month dealing with meth heads, non-English speaking uninsured self/no-pay, prisoners out on day trip to get hernia repairs ... it made me appreciate having active duty people, family members, and retirees as patients.
It's fashionable to bash the O6 surgeon who couldn't cut it in PP and stayed on in a 90% admin job, only to make scary appearances in the OR with the other 10% of his time. But believe me, there are guys in PP who also can't cut it, and they take cases to the OR 100% of their time. I've seen some malpractice in the military; it pales to the kind of things I see in PP.
I also have a wife who loves the military, enjoys living near bases with a big line presence, doesn't mind moving.
Deployments suck, and they don't. The family separation is horrible. But some of the most rewarding times of my professional life were deploying with Marine infantry as a GMO. I'm currently deployed as an anesthesiologist and I can honestly say that when I walk into the Role 3, I think "this is why I joined the Navy" ...
The ultimate caveat is that physician experiences within the military seem to vary wildly. I have been lucky so far. To an extent we make our own luck (it wasn't luck that made me choose the Navy over the Air Force, for example), but luck plays a non-trivial role in how happy people in the military are. Not having the freedom to just walk away from a bad situation is a very real downside to military service.
Money isn't everything. For someone who's miserable in the military, getting away at 17 years might be the wrong financial decision, but the right life decision.
Anyway, take what you want in life, and pay for it.