By them matching or beating the ST performance of Intel and AMD desktop CPU performance (10900K and 5950X, 5.3GHz and 4.9GHz max boost) with a 3.2GHz SoC? Though you're right, 40% is more accurate. No less insane, but more accurate (I didn't actually look up the exact clock speeds or actually calculate anything before now - I obviously should have). The M1 falls slightly behind the 5950X in integer workloads but wins by a clear margin in FP workloads, making it overall faster despite only having 65% the clock speed (or the 5950X being clocked 53% higher, depending on which way you calculate). Saying they have a 40% IPC advantage is definitely no stretch, though.
The exact numbers (assuming both chips maintain peak boost during the entire workload, which they likely do for an ST test):
5950X:
SPECINT2017: 7.29, or 1.4878/GHz
SPECFP2017: 9.79, or 1,9980/GHz
M1:
SPECINT2017: 6.66, or 2,0813/GHz (39.9% higher IPC, or the 5950X has 28.5% lower IPC, depending which way you calculate)
SPECFP2017: 10.37, or 3,2406/GHz (62,2% higher IPC, or the 5950X has 38.3% lower IPC, depending which way you calculate)
As we're talking relative numbers here any percentage will always be somewhat misleading, but the advantage is undeniable and massive.
Magic? Not at all. Just an insanely rich company with near unlimited R&D budgets and the funds to hire whatever engineers they want, licence whatever patents they need, and buy oversized, ludicrously expensive silicon on cutting-edge nodes in a way nobody else can. Could Intel or AMD match them if they had the same resources and could sell these chips? Sure. But they don't, and they can't. The M1 Max is the size of Intel's largest monolithic server CPUs, but with a much lower core count, integrated GPU, NPU and a bunch of other stuff. Intel and AMD's laptop chips are mostly in the 150-200mm² range. Nobody has ever made a laptop SoC even remotely like this - in part because nobody has a guaranteed market for $4000+ laptops like Apple does.