How do airlines provide crews for the return leg of a long-haul flight? In a video, a Swiss International Air Lines crew flies an Airbus A340-313 (flight LX38) from Zurich to San Francisco. Then, they can be seen (I am not sure if this is on the very same day) visiting downtown and the Golden Gate prior to getting back to the airport for the return flight (LX39), which is scheduled for departure around three hours later.

The question here is:

How do airlines handle crew turnovers in long-haul flights? 

Is it the same crew who is demanded to command the return flight? Or is there, oddly enough, a replacement crew in each destination airport? Or do they carry the crew for flight LX39 onboard flight LX38?
You presume that they flew back the very same day... but that is an incorrect presumption. 

For long flights over about 8 hours, strict rest limits apply so they cannot fly again for 8-10 hours at a bare minimum. Typically, a crew from a long-haul flight will stay in a hotel in the destination city for anywhere from 12 to 48 hours, depending on the flight length, timezone changes, airline schedules, union contracts, and so on. Yes the hotels and travel bonuses costs the airline a pretty penny but that's the cost of doing business. 

So at this very moment there will be 1 or maybe 2 LX crews, resting (or touristing...) in San Francisco, waiting to fly a return service. 

For more information you can google or ask a new question on Fatigue Risk Management Systems.