It takes time for heat transfer through conduction, convection or radiation. Compressing or expanding a gas, on the other hand, can be completed in a split second.
As such, if we plunge the piston into the syringe suddenly, we get what is practically an adiabatic compression, accompanied by a dramatic increase in temperature.
–
Similarly, if we “pop the champagne” and let the air out suddenly, we get what is practically an adiabatic expansion., accompanied by a dramatic decrease in temperature.