It allows water to be pumped back to the boiler creating a loop. Stops the boiler from overheating, some old systems have a by-pass radiator what does a similar job.
When replacing that gate valve set the new one a few turns open, not fully or your heating will suffer. Water likes to take the...