Why wouldn't it work? Bulk storage is bulk storage. As for booting from that... Linux has all the required drivers in the kernel, at worst (booting from radically different hardware) select a fallback initramfs with more drivers. If you did a bit-by-bit copy of your drive, partitions should have come out unmodified at the other end, including GUIDs and the EFI label on the EFI partition (if using EFI), or the bootloader in the MBR if using that.
Parent is talking about speed. There are different things in M.2 ports (as this is the form factor): SATA and NVMe, PCIe AHCI[1]. There was probably a slight incompatibility and a fallback to some other mode there.
I've definitely had problems with external storage on Linux machines
> Why wouldn't it work? Bulk storage is bulk storage
You would think so, but anything using UAS is a complete mess and you can't be sure it'll work. I can only assume devices implemented the convenient parts of the spec and fail randomly.
Happened often enough the kernel flag for the USB quirk to disable UAS was stickied on the Raspberry Pi forums when USB boot was new.
Parent is talking about speed. There are different things in M.2 ports (as this is the form factor): SATA and NVMe, PCIe AHCI[1]. There was probably a slight incompatibility and a fallback to some other mode there.
[1] https://en.wikipedia.org/wiki/M.2#Storage_interfaces