Altimeters use slightly evacuated (compared to atmospheric pressure at sea level) metal aneroid wafers. The wafers have a reference pressure outside the aircraft referred to as the "static port". Altimeters are designed to show the correct reading at standard temperature (15C at sea level), but at nonstandard temperature will show a slightly inaccurate indication.
Specifically when the outside air is warmer the altimeter will read a lower indication than true altitude, and when outside air is cooler the altimeter will read higher than true altitude.
I'm wondering why this is the case, since in my head it seems like the air inside the wafers would be subject to the same changes in behavior as the air outside the altimeter, assuming the altimeter is the same temperature as the outside air.