Why are relays able to make galvanic insulation at the output of an PLC?
Because the coil which is powered by the PLC output has no physical or electrical connection to the relay contacts.
Unless you connected PLC positive power or ground to the relay contact or common.
A relay provides galvanic ISOlation, by virtue of the fact that the relay coil is powered by the PLC power supply. But the contacts of the relay that actuate the load are "dry" and the power is provided by the load equipment, not from the PLC power supply.