One was designed to be manufactured as cheaply as possible, the other was not.
I'm going to go ahead and raise a flag on that one. the M9 was manufactured for the US armed forces. believe it or not I noted that a great deal of what we were using was complete and utter crap. every day supplies from toilet paper to ball point pens come in boxes that say that they are made by blind people. you could barely sign your name a dozen times before those pens broke and try wiping with confidence when you read that on your TP roll.
our food came in boxes that say fit for military or prison consumption
. imagine how yummy that chow was.
the military has proven time and again that their largest priory is to go with the lowest bidder that can get the job done. despite my loathing for Colt I must say that I think that they can definitely make a better M4 than remington/DPMS/Bushmaster.
the M9 was a cheap alternative to the 1911 and made the US NATO compliant by switching to a 9mm.
and it is widely known that the Glock 17 was invented to be a cheap alternative to H&K and other high price european arms manufactures of the time.
BOTH WERE MADE TO BE CHEAP BUT EFFECTIVE!!!