I am reading the Joule-Thomson experiment and although I can follow the mathematics I can't understand what is going on. Here is the apparatus
taken from Atkins. So initial the gas is at $P_i$ and because of the opening and the difference in pressure it will eventually reach the right compartment with $P_f$. What I can't understand is what the role of porous plug and how this setup differs from an adiabatic expansion. I mean couldn't we let the the gas expand from $P_i$ to $P_f$ and then record the difference in temperature? Also what is the role of porous plug in this setup if the system doesn't exchange heat and the work is done on the environment in right and left compartment respectively.