I think it has to do with people the weird phenomenon of people that are working as "programmers" that don't know how to program. I've seen a few. I've seen people write C on their resume and I gave them an hour for an easy assignment with the language of their choice, and they couldn't even get anything to compile. The guy probably read a book on C a decade ago or took a C class in college. Me on the other hand, I had python on my resume although I never worked in python or any programming language, but I studied the hell out of it in my free time. It was difficult for me to get my first programming job, so I like this model more. Trust but verify
Another reason is that there is a lot of variability in programming jobs. A programmer or developer in one company may consist of changing a few lines of code in a project they don't understand all the way to architecting the infrastructure the whole organization relies on. It's difficult to parse out the two from just an interview.
If you're hiring an actuary, and they had worked as an actuary before, you're probably pretty certain the work is similar enough, and if they hadn't been fired then they're at least somewhat competent.
I like simple programming problems, something slightly harder than foobar, ideally industry specific. Show them you know how to get a programming environment setup, know how to create functions, for loops, classes if appropriate and basic control flow. With the technical stuff out of the way you can review the candidates work experience