It's purely about compute power[0]. The A17 Pro has 35 TOPS of Neural Engine performance, A16 Bionic has 17. A15 has 15.8.
The M-series have less performance, but I think they're compensated by being in iPads where they can use more power (battery) without impacting people's lives too much.