A relay is just a switch. The purpose of any switch is to turn something on and off. A relay turns HVAC equipment on or off. It’s that easy.
A thermostat is also just a switch that turns HVAC equipment on and off. So why would we bother adding a relay to an HVAC system when we already have a thermostat?
A relay gets us around the requirement that every device in an electrical circuit has to be the same voltage. A thermostat is usually low voltage, 24V. The HVAC equipment