I can understand that devices that function as switches (photocells, timers, etc.) may use the ground as a current path, since there is often no neutral in the box.

Yes, surge supressors will clamp surges between line or neutral and ground, and require a ground for that to work. The line to neutral protection should still work, but that is only 1/3 of the total function. Some of the more elaborate surge suppressors may use the ground for the line-neutral protection.

The original post was referring to a computer with an ungrounded outlet. Therefore, I was thinking mainly of electronics that plug in, not hard-wired devices.

In any case, having an actual ground is preferred even if the device still functions without it.

Sorry for any misunderstandings.

(I think you can find toilets with electronics in Japan, among other places!)