The problem isn't the Thermometer bit, it's the mercury bit. Mercury and Aluminium really don't play well together. Well, depending on your point of view, you might say they play excellently together, but the outcome is you destroy the structure and strength of your aluminium.
The problem with this is that much of the plane (including the fuselage) is made of aluminium, so having it be eaten away by mercury is a bad thing during the flight, and also a very bad thing for the value of the plane afterwards!
If you've not seen the effect of a drop of mercury on some aluminium, I'd very much suggest looking on youtube for a video, it's very quick and very noticable... This article has more on the chemistry behind it, as well as a video demonstration.