Much heat, little light for the O/P.
There seems to be some unspoken assumptions here for some.
First off, mil spec is basically to a) insure that the government won't get ripped off via substandard materials from government contractors (lowest cost bidder remember), b) satisfy whatever congressional statutes and appropriation bills specify in their text, c) can serve a barrier to new competitors to current government contractors which helps insure cushy contractor jobs post retirement for the folks writing the specs, d) serve the executive branch and its bureaucracy's desires--think Teddy and the 1903 rod bayonet here, e) provide the courts with a written standard so that disputes can be resolved. There are more factors than this as government procurement is a strange insular world. For example, here is the milspec for oatmeal cookies and chocolate covered brownies.
http://everyspec.com/MIL-SPECS/MIL-SPECS-MIL-C/MIL-C-44072C_CHANGE-12FEB2003_24607/ I'll bet that you can make better tasting ones in your kitchen using a commercial mix even if the chocolate coating on your brownie melts in 150 degree temperatures or goes stale in a week.
Second, quite a few folks seem to be planning for a worst case Zombie Apocalypse where there are no laws for a decently long period of time as if they were Daniel Boone in Indian country. In which case, a Sherman Tank or a M-60 APC might be preferred as you have to sleep sometime (assuming that you can't afford an Abrams, Stryker, and Bradley). In that case, you should convert your home to a defensible bunker, be prepared to have outer perimeters of razor wire, minefields, etc. deployed, be totally self sufficient for up to one year on food, water, and medicine and so on. Conceal your bunker/home so that the neighbors aren't aware of what you have or that raiders will pass by and ignore as not a likely target. The mil-spec or not of your AR 15 is the least of your worries in these conditions. After all, a Raider might have a Barrett .50 and you never see the shot that takes you out from a great distance. Anyone planning this sort of situation might want to consider having multiple rifles as well as spare parts, maintenance tools, reloading ability, reconnaissance toys, etc. A community of like minded people would also be of paramount importance. Survival prepping of this sort is a way of life to some but the brand name on your rifle will probably have little or nothing to do with your ultimate destiny in such a world.
For most of us,
Using a rifle or a shotgun in self defense primarily will involve doing so inside the home or curtilage (the immediate area such as garages, etc. around the house). Vehicles are a separate case that involve laws etc. that can make it problematic (some states forbid loaded long arms in vehicles). Using these outside of the house can involve a whole lot of issues in ordinary self defense--penetration, distance, etc. Longarms are not easily concealed and in certain situations if used for intimidation factor might lay one open to brandishing charges if used outside the home. What is appropriate for law enforcement or the military to do is not appropriate for average Joe civilian. Joe civilian does not have qualified immunity that leo's possess nor does it have official government sanction of the military's actions (following lawful orders defense). Your tool is for surviving until hopefully the cavalry arrives (police etc.) not to destroy the enemy or arrest suspects.
Thus, extensive worries about whether the weapon will function in dirt, sand, rain, encountered in Vietnam jungles on a long patrol will not really be an issue unless you live in a tent or the great outdoors. If that is your worry in buying milspec, I can provide you with an even better solution--get a SMLE Enfield bolt action rifle--if it functioned in WWI trench conditions and the deserts of the Middle East, it will probably do just fine in your backyard and it has a ten round magazine. With a little practice it is relatively easy to get off 10 to 15 shots per minute and stripper clip reloading is available.
More seriously, relatively few shootings involve longarms by civilians and very few cases of self defense occur at 25 yards or more in the outdoors but these types of events are not the norm even for police. Juries tend to frown upon someone determining someone else's ill intent to do grievous harm at 100 yards, even in riot conditions and probably would frown upon someone acting like their house was Fort Apache and firing through loopholes at the raiding warriors.
What is my point for this post? Having a security plan dealing with likely issues including non-sexy stuff like a first aid kit, fire extinguishers, alarms, situational awareness, etc. outweighs whatever hardware specifics exist. SoCom guys would scare me even if they were bare handed because of their "software" upstairs--e.g. their training and evaluation of security situations skills.