That riddle tests the limitations of language, not physics.
Right, we really should not call the pressure waves that produce sound in our ears (brains) “sound waves”.
We don’t call the light waves that produce vision in our brains “vision rays”, so we shouldn’t call pressure waves “sound waves”.
Having said that, the riddle does pose a rhetorical question regarding physics - the fact that sound does not exist until there is an ear (brain) to hear it.