I see this symbol a lot on European schematics. I believe it indicates the common/ground connection for a DC supply.
In your example schematic, the safety relay appears to be AC powered. Since the light curtain outputs are presumably 24VDC, there needs to be a return path which is why the DC common from the curtain is shown tied to the safety relay.
This is what I was also thinking since it is wired to S21. You would not want to ground the S21 since it typically is a 24V or or a pulsed output from the safety relay.I believe it is a coded / pulsed DC signal, so the safety input recognize that the sensor is active and not bypassed... I've seen this as a problem from some safety laser scanners. There was a recent thread about this as well.
This is what I was also thinking since it is wired to S21. You would not want to ground the S21 since it typically is a 24V or or a pulsed output from the safety relay.