I used to know the answer to this. When I did the EQ1 restoration I enabled the keypad for the CD version. As you mentioned the script is still there, but if you wire it back in through script 400 it's buggy. I recall it allowed any code like the floppy versions (not sure) and clicking outside the keypad area would crash the game. I can't remember how I fixed it, but I always figured the reason the keypad was removed from the CD version was because they didn't have time to solve the crash - they added it back in the Discovery series edition.
FYI, the game included a newsletter that has the code written in the margins. Maybe those sites had trouble reading the sideways text and, since any code works, they assumed 9721 was the correct code.
edit: I've attached the 65.scr and 400.scr that restores the keypad in the CD version. If only 400.scr is used the game crashes when clicking outside the keypad, but rejects bad codes. They must have fixed the wrong code bug before removing the keypad.