Yes. Oh yes.
All of the above and much more, whether they leave military service by separating or retiring, earlier or later in life.
There are many excellent threads with a wide variety of posts about what's possible after just a few years or an entire career in the military. Poke about in the Life After forum.
Some choose to do things closely related to their military skills and responsibilities; some do not.
Employers value the education, leadership and management experience, the security clearances, the self-discipline, the work ethic and many other elements of military officer service.
Some become President.
Some coach basketball at Duke.
Some become _______________. We could fill pages about the post-uniform life and the doors that open, whether the names are famous or not.
Of our family of USNA sponsor midshipmen, now alumni, who elected to depart active duty at the 5-10 year point, we have an FBI agent, several in management tracks with large corporations, two in biz school, one working for Outward Bound, some with DOD contractors, one in medical school.
Of our many friends who have retired at 20 years or later, here's a tiny sampling: second careers with DOD contractors, re-entered government service as senior federal civil service, gone to vet school mid-life and went home to Montana to run a large animal practice on a ranch, Director of Alumni Career Center at a major university, owner of a game-fishing operation in the Florida Keys, Imagineers at Disney Florida, real estate agency owners, Girl Scouts of America executive, United Airlines captain, major port harbor pilot...you will find former and retired military officers in all walks of life.