no its not friction, any volume of gas contains a volume of heat, you must think of heat as quantity x temperature, if you compress it ten times then its temperature must increase ten times, then because heat flows from high to low temperature nine units of heat will be lost to outside ambient conditions, that one remaining unit of heat if allowed to decompress back again, will be ten times cooler.