Graphics programming has this one very, very useful aspect, exponentially more valuable today: the matrix algebra pipelines, and then the requirement to 'think in matrix transforms' is a wonderful and visually engaging way to get your foundation for machine learning math.
This is like saying being a cashier prepares you for a job in high-finance because both involve arithmetic on dollars and cents.
I've been in ML for ~5 years in multiple FAANGs and I have never seen a rotation matrix.
I don't really see this with modern graphics programming, but I was highly amused that my 1980s-1990s graphics skills (in particular, coordinate transform math) were very useful when I started working in robotics in the 2010s-2020s (because forward and inverse kinematics are exactly the same thing as 2d/3d projections.)
The trick there is that they both have related physical analogs, and machine learning math doesn't really (in that while you can visualize them spatially, it doesn't seem to help solve any problems in that space.)