Matrix is for group chats where Discord is for communities. Discord allows you to easily spin up the equivalent of an IRC / Matrix server with a few clicks. Discord is optimized towards the idea of decentralized ownership where each community has their own server as opposed to just a chat room which is often the case with IRC or Matrix.
Decentralizing the hosting of the servers leads to a poor UX. In the past setting up your own IRC server was really confusing for the average user. With discord the process is much easier since they abstract away the complexity by hosting it for you. It's decentralized because there is no central discord server. A bunch of different people run their own discord server and you are free to choose whoever server you want provided you have an invite.
Yeah, IRC shows it's age, but it's easy to get connected and talking, no phone number verification or required account creation, or other byzantine verification process.