Not so much mouse and keyboard, but display. For at least a while (not sure if it's still the case) graphics acceleration would be disabled if there wasn't a display, leading to things like [0] and [1]
this was fixed in software a while ago, even my old 2011 (?) Mac mini no longer needed the dummy hdmi dongle connected to have aresponsive/hw accelerated UI via remote access
0: https://macminicolo.net/blog/files/build-a-dummy-dongle-for-...
1: https://www.amazon.com/NewerTech-Headless-Video-Accelerator-...