Electrical interface changes just need to be paired with compatible motherboards.
Same with hard drives: the interface changed but the form factor has not. They are even compatible with their larger versions: a laptop 2.5" platter drive or SSD can fit in a 3.5" drive bay with a cheap bracket. The SATA versions were backwards compatible speed bumps. Performance was always the maximum supported on the motherboard.
M.2 is just PCIe in a different form factor, so on desktops a $5 passive adapter allows NVMe SSDs to be used on any PCIe slot on even on relatively ancient PCs (though use as a boot drive dependent on BIOS support).
Same with display interfaces. VGA is still supported on many systems, with DVI-I being backwards compatible with cheap passive adapters. DVI and HDMI are electrically identically (minus audio) so cheap passive adapters work.
The broader point is that large incompatible electrical changes are possible because they only mean the new motherboard just needs to be paired with a compatible component. There's still market pressure for backwards compatibility unless the leap is large enough.