In fact the mouse doesn't tell the operating system that it's a mouse. The operating system reads that off as part of the hardware USB handshake what the device is. USB is an example of a system done largely correctly as compared to all the other processors embedded into a SoC.