Who knows how many cameras and audio input devices exist for generic PCs. Probably most of them use standard APIs you could interrogate, but I bet not all of them.
https://www.freedesktop.org/wiki/Software/PulseAudio/Documen...
Similarly, X11 applications can snoop on keystrokes, mouse events, and other applications, etc.
Luckily, there has been a strong push to change things. E.g. Pipewire is going to provide access control for sound devices and cameras, Wayland provides more GUI isolation between applications, and Flatpak/Bubblewrap are introducing application sandboxing at a larger scale.
Not just "X11 applications" but any process that can open your X unix domain socket (usually at somewhere like /tmp/.X11-unix/X0) or, god help you, connect to tcp://localhost:$((6000 + $DISPLAY_NUMBER)).
People would install it on purpose just to get their damn pulseaudio config sorted out.