A certain amount of the problems were from bean counters saving money; using an unsuitable alternate powder, declining to chrome the chamber and bore; failure to adequately field test the weapon; and the ridiculous claim that the weapon needed little or no maintenance. The books "The Great Rifle Controversy" and "The Black Rifle I and II" cover the M-16's early years.
None of this reflects particularly well on Springfield Armory, that took many years to field a "product improved" M-1 (aka M-14), or DOD that arbitrarily jumped to the M-16. American military arms development has been pretty lackluster for the most part. We've been lucky to have John Browning and John Garand around at critical times.
The M-16 is a pretty good weapon now, but it was a bumpy road.