Because pure-software implementations of algorithms are too "expensive" in terms of power and/or latency, the M1 package has logic blocks that implements a GPU, a Neural Network processor, and H.264/H.265/VP9/JPEG/ProRes codecs. When Apple quotes battery life, the fine print says "1080P HD video with brightness set 8 clicks from bottom". Powering down most of the cores and lighting up just one of the codecs is clearly a good way to achieve 18 hours of battery life.
AMD and Nvidia sell GPU "co-processors" that plays games and has been used for machine learning in "GPU mode" (think games using "software rendering"), but Nvidia GPUs now have "Tensor Cores" to accelerate and decrease the electrical power required for some of the linear algebra functions common with ML. Laptop chips from Intel and AMD will have embedded video on package to eliminate an external GPU.