When the military first decided to go w/ a carbine version of the M16, they (in usual military fashion) performed a number of scientific studies and tests. In the end, they determined that a collapsible buttstock had several utilitarian benefits, all of which have been mentioned above. However, what prior posters have left out is the primary reason a collapsible stock was adopted:
IT LOOKS COOL!
Shortly after introduction in Vietnam, there were several reports of indigenous peoples who, after being shot w/ CARs, were heard to ask with their dying breaths: "What kind of gun was that? It really looked cool. It's a shame my guts are all blown out and I'm gonna die, because I'd really like to own one of them. I'd also like to make the world a communist state, but after I get my hands on one of them cool guns."
As reports of the "really cool gun" comments filtered back to the Pentagon, the decision was made to go to full production on the collapsible stock. Not only did our soldiers have larger penises than the enemy, but our guns looked cooler too. (This was significant, as the AK-47 is a really cool looking gun too.) Fear spread among the Cong, as many contemplated the possibility that Jane Fonda would start supporting our side again, and have her picture taken with our military men and weaponry, because it would be cooler to do so.
Alas, however, Tet came and the politicians ran for cover. CAR stocks never made it to every soldier in the field, and we ultimately had to come home without planting our flag in Ho Chi Minh's ass.
We've made up for it in every conflict since. [USA]
Now you know.