I see plenty of reasons in the other answers, but I think it boils down to: "it's a different philosophy".
IRC is akin to watercooler conversations: people who are around may hear what you say and they may join the discussion, but they don't have to. People who are not around are not expected to ever hear about the conversation (though a colleague could repeat it to them later).
When you talk to colleagues behind a whiteboard, you don't expect everything that was said to be recorded. At the end of the discussion, if deemed necessary, you take a picture of the whiteboard and/or write a summary that you save in a persistent place (typically you send the summary to the participants by email).
Now, in 2024, people (especially tech-savvy people, in my experience) have a hard time living with "old school" technology. "Why should we use email in 2024? Does IRC still exist, though it was invented before I was born?". The IRC UI/UX could have been improved a ton, but people have a different philosophy now. They expect everything to persist, they want official communications to feel like WhatsApp (or Snapchat or TikTok, depending on the age) interactions. Many people reaching university now don't know what a "file" is on their system: they just access "stuff" through "apps".
IRC fundamentally doesn't work like the modern chat apps that modern people are taught to use. You can't add threads to IRC and still call it IRC, because you will end up talking to people who don't have threads and it will break either your or their UX. You can't add reactions for the same reason, or history (because you will expect them to see all your messages, and they will assume that it is fine to miss most of them).
TL;DR: IRC is great, and I love it. Nothing is wrong with it. It is just not being used because that is not how (most) people interact anymore. It does not explain why modern chat apps seemingly must be poorly-written ElectronJS abominations, though. Probably it's cheaper to develop and users just don't give a damn.