Benjipede
Can anyone explain to me, why this factoring was the right thing to do?
The notion that there is such a thing as, "the right thing to do", is 100% false.
Two equally advanced expert programmers will (more often than not) have two totally different approaches/criteria for organizing chunks of code into functions. One guy's brain may work more efficiently looking at large uninterrupted blocks of code, while another guy does better breaking everything up into tiny functions. Take Casey's coding style for example it's extremely verbose and doesn't value vertical space compared to what you'd expect to see in more conventional high quality C-like code. But this is his style, it's what he's most comfortable and presumably most efficient at. Or to use probably the most extreme example, check out Ken Silverman's
build engine.
Breaking up code is really about minimizing the complexity of your program
for yourself. And you can't really just tell someone how to do that, it's more of a hard-faught wisdom kind of thing that follows naturally from experience.