I think what is most relevant is oxygen. That's what we need to burn the fuel. Air density is how thick the air is and changes drastically with humidity and temperature as well as altitude. It can't be relied on to get the oxygen content. With a simple pressure sensor, the ECU can calculate the approximate altitude of the bike and make whatever adjustments it can. The pressure at sea level is almost 15 psi and drops to under 10 psi at 9000 feet.
http://www.altitude.org/air_pressure.php
The percentage of oxygen is directly proportional to the pressure.