tbf IRC was and still is more than just chat, file sharing was massive on there. Plus you could setup bots to automate a lot of functions that made running a community much easier. It’s been a long time but I also remember there being a lot of flexibility in terms of plugins to add functionality.
The thing about Discord is that it plays the same role as kids hanging out in Fortnite or Roblox - it’s a communal space where a lot of users don’t particularly value longevity or robustness.