It was convenient, but also quite dangerous. In previous releases of macOS, applications could read global keystrokes whenever they wanted to without any consent from the user whatsoever. What this dialog is asking is for you to grant Discord global keystroke access, so functions like Push To Talk can function while Discord is in the background. This is done to mitigate the threat of programs acting as keyloggers and similar sorts of malware.
In macOS Catalina and newer applications are normally allowed to see only keystrokes performed while the app in question is active.