31.25 kHz is a lesser-known sample rate used in the late 1980s and early 1990s by a few digital effects and at least one sampler.
As is often the case, it makes more sense when you look at it from the point of view of what's simplest to make.
When converting analogue signals into digital data or vice versa, you need to do so at a steady frequency. This is invariably achieved using a quartz crystal oscillator, which can send out evenly paced clock pulses as it's slightly stretched and squashed thousands or millions of times every second.
Two of the most common crystal oscillator frequencies, useful for all kinds of things, are exactly 1 MHz and 4 MHz. That is to say, you can very easily buy whole batches of electronic components that send out a steady stream of pulses at a rate of exactly one million times a second, or four million times a second.
This rather high frequency clock can then be converted into a lower frequency clock using a prescaler, by simply relaying one in every x pulses. There are two main kinds of prescaler: the fancier kind allow you to skip arbitrary numbers; the simpler kind, often made out of flipflops, are strictly limited to powers of two — they can only count one in every two pulses, or one in every four, or eight, or so on, doubling each time.
1 MHz ÷ 25, and 4 MHz ÷ 27, are exactly 31.25 kHz.
So by using a common 1 MHz or 4 MHz crystal oscillator, and a simple prescaler that can only divide that frequency by powers of two, you can get a handy steady stream of pulses at 31.25 kHz, suitable for ADCs and DACs working in the audio domain.
MIDI also works at a baud rate of 31.25 kbps, presumably for the same reason that it can be implemented using cheap and plentiful components.
As an added bonus, using the same frequency for both audio and data should surely simplify devices implementing both. There aren't many devices taking advantage of this, however, as most of the effects using a 31.25 kHz sample rate don't implement MIDI anyway, due to being at the budget end of their manufacturers' offerings.