Or let’s look at the things gate NPCs add to the game.
World building
We capsuleers are rare in this universe. Most of the star cluster we live in is inhabited by other people than capsuleers. People part of the empires, or part of the pirate factions.
All those people have their own ships and these ships we see in space. Amarr ships in Amarr space, Guristas pirate ships in space occupied by the Guristas pirates.
Space would be empty without them.
But why on gates?
Or rather,
Why not on gates?
Those pirates are like us, they live in a system and can be found on the landmarks there. Asteroid belts, anomalies, gates.
So I hope you can see it would be very strange and unexplainable if pirates would never be at (or take) the gates that connect the systems to other systems they occupy!
Besides that, the only NPCs a traveler passing through the region will encounter are the gate rats only. The player wouldn’t see any of the rats at other landmarks which they have no business visiting, which means without gate rats a player would never encounter one Guristas pirate while traversing Guristas space going gate to gate.
Traversing space without seeing any of it’s hostile occupants would be silly and would also be bad world building.
Game mechanics
NPC pirates on gates also have game functions. For one, they offer loot and bounties, or a quick way to get some last kills you need for a daily task.
But you could get that in anomalies or belts too, if they exist. But not every system has those.
Gate rats also can be used for gate camps. Especially more vicious rats like Sansha incursion rats do well when you can place a bubble near a gate in an otherwise empty system to have a gate camp ran entirely by rats.
Gate rats also are a rare risk for me as covert explorer, able to be just where I landed on a gate and make me unable to cloak at an already camped gate. Gate rats are an unpredictable factor that could in fact help gate campers.
I think the game benefits from more unpredictable factors, from more world building and from more NPCs to make space feel lived in besides us capsuleers.
I see no good reason to remove NPCs from gates.