That sounds like a cheap-and-awful Class D (or similar) audio amplifier at work. The speaker is driven by a high-frequency pulse-width- or pulse-density-modulation signal, which (when low-pass-filtered) reproduces the desired sinusoid.
Class D amps can produce very good fidelity, if well implemented (high switching frequency, proper low-pass filtering _before_ the signal is fed to the output, and the use of a good modulator to create the right pulse patterns). They can also be rather awful (e.g the PWM or PDM signal isn't low-pass-filtered in the amplifier, just fed to a speaker whose mass and voice-coil inductance act as somewhat of a low-pass filter).
The advantage of these amplifers is electrical efficiency. The output stage operates in a "bang-bang" mode - the output devices are either off, or driven hard into saturation, rather than being driven linearly. As a result there's very little power lost/dissipated in the output devices; the amp runs cooler than with a Class AB amplifer circuit and the battery lasts longer (a big commercial advantage in small battery-powered devices).