The cooler is a radiator, to which there is a supply of coolant, therefore, when the exhaust gases after the valve enter it, the cooler provides heat exchange between the coolant and the exhaust gases, which normalizes their temperature.