Agreed. I've given a few conference talks and found judicious animations super helpful when I'm presenting code.
Showing 10 lines of code on a screen at once is a surefire way to have the audience either not read/understand it or to read it, but ignore what I'm saying. So I like to build up a slide full of code by starting with a couple line (eg the function definition), then adding a few more, then a few more, and then the whole thing. Subtly animating the new line in is a great way to highlight what's changing. Double-so if I'm reordering lines. Otherwise the code is just flashing from one state to another and it's not always obvious what happened.
Even better, I sometimes want to walk through the execution of code. I love having a red arrow highlighting what line we're on, and animating it between positions is a good way to highlight that we're moving from one thing to the next, especially with non-linear jumps (like from the end of a loop back to the top).
Animation is an easily-abused tool, but it's also a powerful one.