The brush itself works on DC, that's because the battery transmits DC line. They also use a DC motor in the toothbrush, because a DC motor is less expensive than an AC motor.
For recharging the battery there is DC needed. To create electric current in the brush, we use the transformer, but the transformes only works with AC. The toothbrush works on DC. So when the electric current is in the brush itself, it's needed to transform the AC into DC.
They use rectifiers to rectificate the current. With one rectifier the negative current can't pass.
The first picture is how normal AC looks like. The last pictures shows the effect of the rectifier.
When they use 4 rectifiers in such way, it's possible to make the negative part, positive.
To make the current more like DC they use a capacitor. (red line)