Radeon Pro 580 in my 2017 iMac is much much better on paper than the M1 gpu. However when I edit photos on the M1 Air of my girlfriend, it's much much faster than editing them on my iMac. It's not even comparable. I just don't get how this small machine is this fast.I agree that the M1 GPU is not dog crap (unlike the gpu in the Intel Mac mini). However plenty of other Intel Macs ship with better discrete GPUs, in particular the 16" MBP and the 2020 27" iMac. In the case of the 27" iMac, it is available with far better GPUs than the M1 in the 24" iMac.
And the speed difference is not just due to CPU, when I enable metal GPU acceleration during photo editing, M1 gets a better boost than iMac and becomes 2-3X faster.