Because it's one of the rare still used open protocol supported by multiple servers and clients implementations and not backed by single corporate entity.
In short there are other new technologies, but most of them are corporate walled gardens, or small open source projects that only have one server/client implementation, and few servers under control of single entity.
The Matrix ecosystem is the only thing I can think of, that could eventually replace IRC. (There might be others, I am just not familiar with them)
End even if they are somehow similar, discussions on Discord and Slack and other similar platforms are different than on IRC, at least in my experience.
One defining future of IRC at least channels I frequent and Discords/Slacks/Matrix is less memes and animated things grabbing your attention.
Another big thing is, that new stuff like Discord/Slack/Matrix are combination of messenger and discussion forum, while IRC is discussion only.
I almost never bother reading chat history in IRC, but in Slacks/... you are expected to keep up with @mentions and on "important channels" etc.
IRC is more of a tavern room, you come in have discussion with people currently in, some people come some people go during that and then you leave and that is that.
While on newer apps you are expected to keep up. I don't know how to describe it better, but fore me that's the biggest difference.