Mozilla has said they thought it was too difficult to monitor and moderate. Could that have been solved by moving to Freenode? Probably, but there are other issues with IRC.
Having to run your own IRC bouncer increases the barrier of entry, as does nickserv based auth. Modern people also expect to be able to seamlessly post images, large code examples, files, etc. Some people also want support for threaded conversations. None of this is offered by the typical IRC setup which Mozilla probably thinks that it scares away users. I do not think Matrix solves all of these yet, but it solves some of them.
Having to run your own IRC bouncer increases the barrier of entry, as does nickserv based auth. Modern people also expect to be able to seamlessly post images, large code examples, files, etc. Some people also want support for threaded conversations. None of this is offered by the typical IRC setup which Mozilla probably thinks that it scares away users. I do not think Matrix solves all of these yet, but it solves some of them.