Normally, in the fixture, the hot and neutral should both be isolated from the chassis of the fixture. So it shouldn't matter whether the fixture is earthed or not.
We earth things to allow for the possibility that hot or neutral is leaking onto the chassis. The idea is the chassis can't shock people; and if the leakage is severe, this will cause hundreds of amps to flow and trip the circuit breaker.
So what you certainly have here is a double failure.
- the earthing was faulty ...AND...
- the fixture developed a fault to chassis of the equipment.
The first one is the installer betting your life on the second one. The second one is the builder betting your life on the first one.
Was this a quality light that just had a bit of bad luck? Look for a BSI, TUV, ETL, UL or CSA certification on the fixture. CE is acceptable only if it was bought at a competent bricks-and-mortar retail shop inside the EU proper such as Wickes or Redoute. CCC is rubbish. Rubbish should be sent to Big Clive to tear down (literally and figuratively) on Youtube.
Perhaps one should not rely on plugs for wiring of safety earthing; in North America a ground wire must be wrapped in shepherd's hook fashion around a screw terminal (even while other methods are tolerated for the other wires).