The following is relevant to the ASTER U type and the SF15 type.
It’s only the equipment in the location cupboard that is earthed. Specifically, the case and one side of the 24V DC supply.
The rail circuit is not earthed (as it goes via the track transformer or via a capacitor in one of the trackside tuning units.
I believe (I don’t have any facts) that the reason is to reduce electrical noise and to provide some protection against both external interference and some limited protection against electrical storms.
Gas discharge lighting protectors are also used.
DC track circuits cannot be earthed, as this makes a wrong side failure more likely if an IRJ fails. Or where common rail wiring is required (two track circuits sharing the relevant rail), such as through point work or fixed/moveable crossings.