What does it mean for a signal to be 5V with respect to one leg of an AC input?
I think the rather unconventional SMPS arrangement produces a -5V supply with respect to one side of the (floating) 24VAC input. 

In other words, the 'ground'  is -5V with respect to J4 pin 2. Presumably this matches up with the inside of the device and allows communication using the 5V logic translator. 

It does look kind of dodgy- but the Schottky diode should protect against obvious issues. 

An LM7905 would do something similar, but its not rated for enough voltage and would be very inefficient.