Nowadays digital thermometers are used, but in the past mercury based thermometers were used. From my experience the mercury does not flow in the thermometer tube. Mercury is a liquid, so it must have tendency to flow. Why does it not flow when tilted?
This is because the thermometer tube it is contained in is so small in diameter that surface tension effects dominate over gravity and inertia effects. If you were to smoothly increase the diameter of the thermometer tube, there would come a critical point at which for that diameter, tilting the tube would cause the mercury to run out of it.