Sure for experienced developers command line tools are used daily (at least for some developers), but for many students it can be alien world that they don't use outside the lessons.
Also overall usefulness. Simple terminal program that responds with a fixed message, is just an exerciser but otherwise useless. You need to get a lot more complicated to make useful tool. But a chatbot which responds with fixed messages (usually FAQ type stuff) is a commonly used tool for the purpose of community management.
2. The social component is fun. Students can easily show their work to each other. Don't underestimate the power of memes.
3. The Discord server provides shared history/some persistance without the students needing to implement their own servers.
Discord also supports some simple UI elements - images, buttons, form fields, and dropdowns - so it’s a nice step above a CLI for teaching UX, which is part of the course.