In Merlin 1D Vac engine:
the turbopump drive exhaust goes around the nozzle. Why is that so?
The feature also seems to be missing in the first stage engine, as seen here: (screenshot taken from SpaceX Testing: Merlin 1D Engine Firing
The turbopump exhaust in the Merlin 1D vacuum versions is directed into the nozzle where it acts as a cooling layer between the very hot chamber exhaust and the wall of the nozzle extension. The plumbing wraps around the nozzle completely so it can form an even "curtain". This allows the nozzle extension to be lighter and simpler as it doesn't need to pass propellant through it for cooling as the upper part of the chamber and nozzle does.
Here's a shot of the Merlin 1D vac engine from the side, during a test fire; you can see the wraparound duct a little more clearly here. (The nozzle extension is not installed here, because it doesn't play well the with sea-level atmosphere of the test stand.)
The Merlin 1C vac and prior iterations didn't do this; the turbopump exhaust had a separate duct directed to the side. Here we have two first-stage Merlin 1C and a vacuum Merlin 1C; the turbopump exhaust duct on the vacuum version is canted outward to avoid impinging on the very large nozzle extension (not installed in this pic).
The turbopump exhaust wraparound arrangement is not uncommon on gas-generator engines dating back to the Apollo-era F-1 and J-2.