The integration into the SoC is partially responsible for the amazing performance. The extra travelling distance for a click-in ram stick adds up, in terms of latency, quickly
Not really less latency so much as the signalling can be run at much higher speed and/or much lower power without having to worry about stuff like the optional termination, the electrical properties of the socket->dimm connection itself, and much shorter track lengths. It also allows you to have as wide a bus as you want, limited by cost of packaging and die sizes on the package, instead of dimm size and board layout, which naturally has a much higher trace pitch than the package.
The higher speed "may" cause lower latency, but it's likely secondary at best.
The memory bandwidth is a hell of a lot better than that $16 8GB stick mentioned upthread, though. 100GB/s on the M2 or 200GB/s on the M2 Pro. It may be possible to find actual comps with similar performance at a much lower price than Apple charges, but that $16 stick ain't it, or even close.
That should happen in the future, but so far Apple hasn't really taken advantage of the massive improvement in signal integrity and their latency is similar to desktop x86. If someone figures out how to overclock one of these machines, we can find out if they're just being extremely conservative or if the memory controller is extremely weak compared to what you see on x86 desktop CPUs.
The higher speed "may" cause lower latency, but it's likely secondary at best.