They're achieving that bandwidth by putting ridiculous bus widths on the SoCs. The M1 Pro has a 256-bit bus to memory, the M1 Max has a 512-bit bus to memory, and the M1 Ultra has a 1024-bit bus to memory.
No, Apple isn't achieving that bandwidth with DDR4:
"M2 uses LPDDR5-6400"
Don't get me wrong, it's stunning performance, and having it on the same package as the CPU and GPU has other benefits.