While you are on the right track, you are factually in error when you state that "… the memory modules themselves are the same."
While a lower speed module may use matched individual higher speed chips than the module is rated at, modules may differ according to circuit design, and the programming content of the SPD EEPROM—or Serial Presence Detect Electrically Erasable Programmable Read-Only Memory—device. While it is relatively unusual to see circuit designs which render modules unworkable in applications they were not specifically designed for when they physically mate with a slot, it is quite common to see failures based upon a SPD mismatch.
Apple looks to SPD data to determine module identity, in accordance with the JEDEC standard. Your machine knows not what is physically inserted into a compatible slot without this information. Apple publishes memory module design specification publicly for its machines which are based upon JEDEC standards, and these are used by designers and fabricators to insure compatibility.
A technical note from Micron in portable document format—which explains SPD technology—is available for download
here.