Capacitors store and release energy. The rectifier diodes only conduct at the peaks of each sine wave, resulting in pulsating DC. As the pulses hit the capacitors they charge up, storing the energy. As the transistors send energy to the motor, that energy is drawn out of the capacitors.
" We are all here on earth to help others; what on earth the others are here for I don't know." -- W. H. Auden