Happens with rotary dial combination padlocks, like those used for school or gym lockers. You don't go by the numeric code, let alone remember it. The things are only accurate to about 12 points around the dial anyway, so if you recovered the code from your muscle memory, it wouldn't match the original digit for digit.