[Sorry, off topic post.]
White Bear,
There are many other variables caused by changes in air density with altitude, and hence its compressibility and other factors in the inlet tract, but, in very rough terms, the carburetor does not so much read air mass as air velocity.
The pressure drop this velocity creates as it passes through a venturi in the inlet tract serves to siphon fuel from the float chamber into the inlet air stream.
Obviously the element in the air required in combustion is oxygen, which decreases in abundance, for any given volume of air through that signal venturi, with altitude.
The volume of air, more a less, being a constant of the pumping efficiency of the engine maintains a more linear siphon effect on the fuel than is required resulting in the mixture becoming over rich, hence you lean the mixture to compensate.
By no means the best example, as it's more concerned with design inefficiencies than principle, but take a look
here (some way down the page) for a little more insight. (Sorry, only made a very brief search for an example and this certainly isn't the best, previous or subsequent pages may be more relevant possibly.)
Edit to add:
Here's a better link. Scroll down a good way to a section sub-headed 'Mixture Control'.