Why does Joule-Thomson expansion of a gas do no (external) work? I understand one of the benefits of the Hampson-Linde cycle is that there are no cold-side moving parts, but isn't one losing an awful lot of energy in the throttling process? There must be something basic I'm missing here, because it looks almost like this cycle destroys energy: pressure drops while volume increases, and temperature drops at the same time. The expansion is isentropic (How does that differ from an adiabatic expansion? I thought the condition that dS = 0 constrained a gas to a unique trajectory - an adiabat - along which it does work. But unless I'm mistaken, a Joule-Thomson expansion does no external work, despite not being an expansion into an evacuated space. Where did the work "go"?
Maybe an example might illustrate. If I let air out of my car's tyres, is that a Joule-Thomson expansion? If so, doesn't the expansion do work in lifting the atmosphere by 20 attometers? If not, what is an everydayish example?
 A: The question, as I interpret it, is about the conservation of energy during Joule-Thomson expansion. (That is, expansion of a gas through a small hole or porous plug, where there is a pressure difference between the two sides, and no work or heat is exchanged with the environment, except for work associated with the pressure change.)
Consider the classic Joule-Thompson experiment, where gas in a pipe is forced through a porous plug. Let the pressure on one side be $p_1$ and the pressure on the other side by $p_2 < p_1$, so that the gas flows from side 1 to side 2.
Now consider the passage of a small amount of gas from one side to the other. On side 1, the rest of the gas does work $p_1 V_1$ to push the packet of gas through the plug (where $V_1$ is the volume that the packet of gas has at pressure $p_1$). As the packet comes out of the other side of the plug it must displace a volume $V_2$ of gas, doing work $p_2 V_2$. In your car tyre, example, $p_2 V_2$ is the work the outflowing gas does in lifting the atmosphere.
In general, for real gases, $p_1 V_1$ will not equal $p_2 V_2$, for the reasons explained in John Rennie's answer. It can be greater or lesser, depending on the properties of the gas and on the two pressures. This means that the energy lost as work on side 1 will not equal the energy gained as work on side 2. This energy change must be compensated in order to satisfy the first law. Since the gas can exchange neither heat nor work with its surroundings, the only other thing that can change is its internal energy. The first law implies that $U_2 - U_1 = p_1V_1 - p_2V_2$, as Wikipedia explains.
It happens that for most gases at room temperature, $p_2V_2>p_1V_1$, which implies that the gas's internal energy (and therefore its temperature) must decrease as it goes through the plug.
Note that we didn't assume the entropy stays constant, and in fact it increases: the entropy change associated with expanding the gas must be greater than the entropy change associated with reducing its temperature, otherwise the gas would not flow through the plug.
In your car tyre example, the gas does indeed to work in lifting the atmosphere, but this is less than the work done by the gas inside the tyre forcing it out through the valve, and this is why the temperature has to decrease.
A: The Joule-Thompson effect is only non-zero for non-ideal gases, and arises because when there is a potential between gas molecules the potential energy changes as a function of the spacing of the gas molecules (for spacing read mean free path in this context).

The diagram shows roughly what the intermolecular potential looks like (this is the result of a quick Google and comes from the Encylcopaedia Brittanica - you'll find much similar info on the web).
At long range the intermolecular potential is attractive, therefore as the average spacing of gas molecules is increased their potential energy is increased (just as taking a satellite farther from the Earth increases it's potential energy). This increase in potential energy has to come from somewhere, and it comes from the kinetic energy of the gas molecules i.e. they slow down and therefore the temperature drops.
However there is a competing effect. At close range the intermolecular potential is repulsive, so as gas molecules approach a collision their potential energy goes through a minimum and increases again. As you increase the mean free path you decrease the number of collisions per second and this tends to decrease the average potential energy, which means the molecules will move faster i.e. their temperature increasess.
Which effect wins depends on which bit of the intermolecular potential has the most effect.
A: I believe the "work" done is the drag/skin friction between the flowing gas and non-moving surface of the valve material. The valve material surface resists movement and the increasing friction causes heat transfer from the fluid's molecules to the skin of the valve surface. Thus the fluid loses some of its energy by this irreversible heat transfer. 
If the energy transfer is too great, as with excessive fluid velocitites, the molecules at the surface of the exposed valve materials will become so active that their internal kinetic energy overcomes the connective bonds with surrounding molecules, and they jump loose = erosion. Same principle as adding heat to make water boil.
With a turbine, the blades can rotate around the shaft, from skin friction torque exherted by the fluid's force. But a non-moving valve material surface cannot move. It just sits there and takes the beating of the fluid's energy. This is the "work" energy transfer. (Same friction idea as plate tectonics.) 
