The thing with military service weapons is that they:
1. Need to be simple to operate under any conditions.
2. Need to be durable and remain so under a decades long service life.
3. Have to have reliable and positive safety mechanisms.
4. Have to be able to do the job they are intended to do.
Glock has been very smart in its marketing campaign and has offered its guns to many law enforcement agencies at rock bottom prices. From the perspective of a police agency looking to buy guns, Glock can charge less than companies like Kimber, HK, or Sig. I don't think Glocks are bad guns for the average police officer or citizen. Once an agency has invested the time, money, and training into selecting a duty weapon, it can be a very tough sell to make the decision to switch to another gun, even if the current model isn't the best one for the job.
Military weapons of all types need to be simple, rugged and reliable in the extreme. Before we switched over to the 9mm Berettas in the 80s and 90s, there were 1911's in the inventory that were built in WW2. As a matter of fact, the US Army procured the last complete .45's under wartime contracts. That meant that when the .45 pistol was withdrawn from service, the frames and slides were almost fifty years old. Show me a Glock that would stand up to that kind of use. For military purposes, they just aren't durable enough, nor does their Glock action provide the sort of safety mechanism demanded of a military service pistol.
cheers, Mark