Exactly.
In Empire Strikes Back, I always assumed that General Veers landed his force on Hoth outside of the area covered by that energy shield they talked about, then his forces had to move across the surface to their target area.
Either that, or that the walkers needed to be offloaded from a larger transport that was vulnerable on the ground.
As the nephew of WW2 vets who each told me stories about how to conduct amphibious operations, I assumed this even as a kid when I first saw that movie.
In Return of Jedi, they wanted to sneak into the shield generator control area to surprise the crew, so walking a distance from the lander made a lot of sense (though walking around with white and gold droids was insane). There are a few such cases in sci-fi where your lander should be outside of sight of the enemy, but the majority of the time it's just bad writing from a tactical standpoint.
I remember seeing, "Starship Troopers" with some fellow ROTC cadets as I was working toward being an Army LT at that time (I was halfway through my senior year when it came out), and as we left the theater, several of them noted how on Klendathu, the landers came down right where they wanted the soldiers. These were guys who weren't even sci-fi fans as I was/am, and they commented how smart that was, unlike other examples in sci-fi even they could think of!