Why headphones change the result
Headphones differ in sensitivity and in how they couple to the ear. A sealed in-ear tip delivers noticeably more level at the eardrum than an open-fit earbud driven by the same signal, and frequency response varies between models on top of that.
Without a correction, that difference lands directly in your thresholds: the same ears can look several decibels better or worse depending only on what is on your head.