A candidate's military experience is no indicator that he will be a good executive.
It shows a willingness to put yourself above country. As well, it can help get rid of some of those "chickenhawk" attacks that we're all so fond of.
I would argue that (for most people), running for President is putting yourself above your country. Yes, some people want the glory and power associated with the job, but the POTUS fulfills a stressful role, which can be physically and mentally taxing on one man. In some senses, it is self-sacrifice: you lose some of the little things we take for granted, such as merely walking down the street to grab a burger.