Two identical fire alarms- different pitch
The device that produces the sound is a piezo-electric transducer: 

It works like a speaker, but as you can see, it has three wires, not two.

The detector sends the alarm signal to the transducer through two of the wires to produce the basic sound.
The third wire sends feedback to the controller, which allows it to slightly adjust the frequency of the signal it is sending so that it matches the natural resonant frequency of the transducer.

This positive feedback mechanism means that the transducer will be sounding at its loudest possible volume.
Think of a wine glass ringing when someone sings the perfect note that matches its resonant frequency.

It also means that even though the controller initially sends the same frequency signal, any two units will not necessarily resonate at exactly the same frequency.

See What's the third wire on a piezo buzzer? - Electrical Engineering Stack Exchange for a more technical explanation.



A similar thing happens in two-stroke gasoline engines.  If you've ever ridden a dirt-bike, you might have noticed that there is an RPM sweet-spot that provides maximum power.  Again, this is produced by resonant feedback from the exhaust system that causes, at that one frequency, unburnt fuel in the exhaust gas to be forced back into the cylinders.  Every engine will have a slightly different sweet-spot and sound slightly different from every other engine.