Here's an example of an occupancy sensor that didn't have the EGC connected properly, and didn't operate properly at all. It depended on the mounting screws for grounding, instead of the EGC pigtail on the unit.
The same model occupancy sensor had a neutral connection in the past, previous models to handle the load of the electronics.