Looking at photos of the Pi5 board, the PCIe pins are a separate ribbon connector. I am guessing the M2 hat will just use the GPIO pins for power and hardware detection, and pass the others through.
I agree it would be have been useful to have an M2 slot (or maybe eMMC connector) integrated indirectly to the board. Other similar SBCs have done so. Perhaps the Pi designers were concerned about board space or thermal considerations. I imagine they want to keep the form factor as similar as possible each version, so they maybe can’t make drastic changes to the board layout.