It’s surprising because (anecdotally), math students in college consistently have a much easier time learning computer science than other students. I’m not sure if there have been studies on this, but it was remarkably consistent when I taught first year CS.