The ozone is created from the sparks of the brushes, but also typically the wheels and pickup rollers contribute.
You might be asking then why doesn't my can motor create as much?
Lots of reasons. The AC universal motor uses electromagnet coils for both the armature and the field, where the can motor uses permanent magnets for the field.
The can motor is getting DC and is lower inductance so less sparking, where the AC motor and it's series inductance produces more kickback and thus sparking all while also being on AC VS DC.
The universal AC motor typically draws higher current- also causing more amperage and spikes at the wheels and pickup rollers also sparking.
One way to think of it is the can motor being DC, along with the smaller commutator and higher precision, being driven with rectified and often filtered DC, along with higher efficiency and thus less current- all equals way less ozone.
The universal AC motor is brute force. The commutator and all that inductance, larger diameter and less precision in the commutator, high inductance and lots of inductive kick- basically you created an spark machine to create ozone.