Its the nature of all gasses. The temperature increases as the pressure increases because the molecules are closer together.
Air pressure is caused by the weight of all the air above sitting on the air below. The higher you go, the less air above so the less air pressure. And when air pressure is less, the molecules are farther apart, so the temperature is lower.
Because there isn't as much air.