People use this motor and wiring as replacements in older machines.
The system does not use a two-speed motor. It uses a diode to cut the waveform in half to reduce the maximum power to the motor in the slow setting.
You could create the same setup on another machine using an inexpensive DPDT Center-Off switch and a diode.
This is the basic wiring diagram with the switch in the middle position (off).
During high-speed operation, power goes through the switch, the motor, and the pedal. The pedal is the only thing that reduces the power to the motor.
During slow-speed operation, power goes through a diode which cuts the waveform in half which reduces the power to the motor, then through the pedal which further reduces the motor speed.