The M1 Garand was not 100% reliable and used corrosive primers and powder.
The M14 was also problematic at times.
The AR-10/AR-15 platform is a sound design. When it was translated into the mass-produced M16, mistakes were made.
1) They used the wrong grade of aluminum on the receivers which was highly susceptible to corrosion.
2) They changed the powder content of cartridges which caused much more fouling than than the intended powder.
3) It also threw off the timing of the rifle, causing it to malfunction.
4) They did not chrome the chamber, which resulted in corrosion and stuck cartridges.
Note that this was in 1967 (as of this writing over 52 years ago)
And there are still people who will not even touch one because "The gun is notoriously unreliable ?"
"Really ? Didn't they do jack to fix any of the problems ?"
There have been hundreds of upgrades to the M16 platform over the years, several major revisions into the current A4 variant, but almost every other aspect of the guns have been revisited over the years.
Several million people own AR-15's, if it was that bad a gun they would have noticed something …
Even if you have a problem with your AR-15 there are at least a dozen fixes and upgrades to every issue you might have.
The US Army has had at least a dozen programs since the adoption of the M16 and they never found anything good enough to replace it, despite having tried every trick in the book from three-round burst, flechettes, sabot, duplex ammo, extremely high rates of fire, ballistic computers and any other attempt to force the laws of physics into allowing for a single snap-shot to utterly obliterate any target that so much as pops a single atom from behind cover.
The last big update to Rifle technology was the conversion to a weapon that could reliably and accurately fire an intermediate cartridge at full auto, that transition has been made 50 years ago, since then we haven't forced a sufficiently big improvement to warrant a complete replacement of the M16/M4.