Could it be a solo student?
Many students are flying aircraft that are not transponder equipped, and as such are quick likely never to have encountered a transponder or know what a squawk is.
The term IMC may not be familiar to a student either. Had they been asked could the 'remain clear of cloud and in sight of the surface', or even 'can you maintain VFR', I'm sure they would be more familiar. I'm not sure the term IMC is used that often in the PPL (VFR) syllabus.
Do we know it was a qualified pilot? Do we know that they were passengers on board?
Even if it wasn't a student, an overloaded pilot in a state of panic can do strange things.
dp