I think (I'm no animal expert and don't pretend to be) they do that when they're about to be fed, so they're in a hurry and trying to anticipate where the food will be put down (or else they know where it will be put down and are in a hurry to get there, while also wanting to be close the food that you have in your hand - just in case you put it down somewhere else. (lol) ).
I think, maybe, too, though; that when food isn't what's involved they may know that something you're doing will involve them (or at least they plan to have it involve them), but they're uncertain about where you're going and what you're doing. Cats tend to feel least secure when there's nothing (like a wall or a person) in back of them. So, I wonder if, maybe, in the uncertain of "what's going on" and "what we're doing" ("we" as in "they and their person") maybe there's an element to their feeling safest with their person following them, rather than the other way around. And/or, maybe, too, they're just leaders by nature and not particularly inclined to follow behind anyone that they're not chasing. If you think about it, they most often walk next to us or close in front of us. I can't help but think the different may be "the anticipation/uncertainty" factor.
Maybe, too, they worry about being left behind; and they do tend to like to stay close to their person (especially when they know they're involved).
OR, if they're super-, super-, smart; maybe they're not thinking about themselves and their own security/interests at all; and instead, maybe, they're being thoughtful and not wanting to slow us up by trying to guess where "we" (they and their person) are going and getting there early enough to please their person. (Somehow, I think this is unlikely, of course; but I couldn't resist throwing it into my mix of guesses/assumptions.)
Either way, have patience with them. Enjoy how much they trust you and how enthusiastic they are. See it as cute and funny that they do it - BUT make sure you walk very, very, carefully or else they'll end up killing you and themselves when you trip and fall on them, as your face and skull hit the floor :)