The issue isn't Agile. The issue is the distinction and separation of project management from software development, which the Agile Manifesto is about -- essentially that programmers know enough about how to work that dealing with PMs is not necessary.
The real issue is that PMs ate the Agile Manifesto and took it all the wrong ways, deciding that "Agile" means "don't figure it out first." Brrt, wrong. Within Agile, you're still supposed to do requirements gathering, the difference is that it recognizes that sometimes exploratory development is crucial to finalizing requirements and sometimes the requirements will have to change.
The projects flopped because they used "Agile" as an excuse to not gather requirements first.