Either way we are making assumptions - of course we can use screen size to turn off for mobile, but some mobile devices are good enough to run the animations. Having some way to measure, even if not guaranteed accurate, just adds one more data point to make a decision on whether to turn off animations or not.
It's a virtual machine, so it's very much a special edge case that is unlikely to ever happen to real users. Because there's no GPU pass through, even switching windows animation by the system ramps up CPU usage to near max for a second. A more realistic scenario is indeed on a lower end mobile device or on a really old machine.
Agreed on reducing animations on mobile, but some minimally animated elements still are important UX wise to make it feel more like a native app. But of course, that can't come at the price of lagging UI, which will then be more harm than benefit.