A port is a slot for ships. Really big ships requires really big slots. The biggest modern ships are over 500 meters long. And dry docks require you to float the ship in, then seal it in and be able to drain the water out - given that those ships are ~50m wide, you’re talking about a huge construction project just to serve one ship at any given time. Turnaround for ships can be hours or days, so you might want multiple bays.
It might well be cheaper, to just have a small ship with a crane or something. Then you don’t need to build a 500mx50m swimming pool. In imperial, that’s 20 olympic swimming pools.
Okay so statistically speaking, in agrarian/preindustrial societies more than 9/10 of them would be farmers, which means they would (hopefully) have pitchforks. And if you don’t have a pitchfork, then you shouldn’t be at the front because then you’ll be blocking someone with a pitchfork. You can carry a torch or something maybe.
Also, some farmers might have multiple pitchforks (so the wife/kids can pitch in, I’m pretty sure that’s the literal meaning so not a pun BTW), and would know you probably don’t have a pitchfork so would kindly bring along a spare to the angry mobbing.
Point is, the stereotype is at most off by 10%.