Why does a mouse need a crystal?
That MOS 5717 thing is most likely a microcontroller or some part that executes code. It needs a clock to run.
However, just a clock for a micro doesn't need crystal accuracy. That is probably for communication. USB requires a fairly high-accuracy clock.
A mouse doesn't need to track real time, and there is no reason for it to be in sync with the CPU clock. Its USB clock must only be close enough to the host's USB clock for communication to work. Timing about how fast mouse events are occurring or time between mouse events is handled in the host. The mouse just sends info about what it senses happening.
Added
The above was written in response to the original question, which made no mention of this mouse not being USB. Since pretty much all new mice have been USB for a decade or more, it was reasonable to answer in that context. When you ask about something unusual, it's your responsibility to make that clear.
Despite not having USB, this mouse still had a processor that needed to be clocked. It also apparently used timing to measure the positions of pots connected to a joystick, something else the OP failed to mention. It seems now that a comment by supercat is most relevant, so I am copying it into the answer:
The Commodore 64 has potentiometer inputs that measure the time required to charge fixed capacitors through variable resistances. Software expects that a mouse will read as a resistance value in the range 0-255, and that it will wrap cleanly 254, 255, 0, 1, etc. which means the mouse has to accurately time its output pulses to within less than 0.4%
The MOS 5717 has quite a bit of independent work to do on its own to create the mouse functionality from a set of optical encoders.
The description from the datasheet states it the best as,
The 5717 is a custom CMOS mouse controller for the Commodore 64. It will be housed in the body of a two button mouse, enabling it to be plugged into the 64 joystick port and provide mouse control of GEOS software,etc. It achieves the mouse function by grounding the SID chip's POTX and POTY lines at various times in the SID 512uS cycle to provide the 64 with positional information.
Before ADCs were free to add to just about any IC, the SID interface used the charge/discharge time created with potentiometer and an input integration capacitor to estimate the 'pot' value. The 5717 emulates a potentiometer with digital outputs by controlling the signal timing on the POT lines.
You can see such oscillator in many electronic device nowadays. A microcontroler execute operation at each tick. To control and understand what the µC is doing, you need an accurate clock. Most µC has a build in clock but it is not very accurate.
As said @Olin Lathrop, this accurate clock is needed eventually for the USB protocol or, for doing some measurement periodically...