I hear a lot of advice to season the entire pan, including the handle and bottom of the pan along with the inside. Is this really necessary, and if so, what purpose does it provide?
It helps keep the pan clean.
I know in my cooking, there's always a chance of something dripping, something splashing, few drops running down the side, which might need wiping up with a damp towel or can just be ignored (and left there). not to mention the possibility of moisture in the air. And unseasoned metal can rust.
The first pan I had, I seasoned just the cooking surface... and after a few months, when I was cleaning something, I noticed the bottom had started rusting - not much, just bits of subtle discoloration, but enough that I noticed it. Probably, if left a long time or in moister circumstances, that rust might get quite bad, perhaps leaving rust flakes or compromising the structure of the pan.
So the handle might get some spatters of whatever is cooking, or your hand might not be quite clean, and the moisture can start eating into it. Or a few drops might end up on the outside of the pan to run down to the bottom, or end up on top of the stove coil or any surface the pan might rest on - when serving or moving pots. Cleaning up such spatters, or generally cleaning the pan, might easily leave behind a little moisture. And add the possibility of moisture pulled from the air - humidity, steam, whatever - and an unseasoned surface will slowly start to pick up rust.
I don't think it needs as much seasoning as the rest of the pan, since there's less exposure and less wear on these surfaces. And obviously you can use the pan for quite a while before it becomes noticeable, much less an actual problem - but a layer of seasoning just to waterproof it a bit seemed like a good idea after I saw the bottom of that pan.
Seasoning the handle and outside helps resist RUSTING your cast iron. The 'varnish' (partially oxidized/polymerized oils) is hydrophobic, and helps avoid rusting your iron. But do please dry your cast iron as soon as you wash it. I do the handle/outside about a quarter of the times when I reseason.
Cast iron is very porous. Used oil soaks into it, blocking those pores. Carbon steel has been hammered or stamped, closing the pores. So you season cast iron for a surface lubricant, and so food does not stick.
You do not wash cast iron with detergent because that will remove the oil in the pores. Cast iron with salt on it rusts very fast.
Seasoning cast iron gives a hard finish. On steel, the oil is just a surface lube so food won't stick. Both cast iron and carbon steel will rust.