I wonder what kind of motor your fan had.
A problem motors have to solve is keeping in contact (and conducting electricity to) with something that’s rotating. One way we’ve solved this problem is with a brush motor. The rotating part of the motor is in contact with flexible brushes made of a conductive material that touch the rotating bit.
Over time the brushes can get worn down leading to intermittent gaps in contact; when such a gap occurs, electricity can jump through the air and over the gap, leading to tiny arcs and flashes.
My understanding (and I’m certainly no electrician) was that brush motors are generally used in things that aren’t on for super long periods of time, like power tools (and it’s quite common to see arcs fly when using a power drill or Sawzall) because something like a fan (that could be on for hours or days or even weeks at a time) would wear down the brushes too quickly leading to arcs; but a quick Google search reveals that brush motors are common on fans.
Whether these sparks are normal in your type of fan or a sign of worrying deterioration I will leave to the experts, but the worry would be that these arcs damage the brushes even further, and if the contact gets bad enough you could have more intense arcs that lead to more serious damage or even fire. Again I don’t know how likely this is in your case, though.