The Kathmandu Valley is a closed bowl with a small number of usable ways in. That single fact governs almost everything in its political history. A ruler who holds the rim controls the food supply, the salt supply, the arms supply and the revenue, and does so with far fewer soldiers than an open frontier would need.
On the western side the usable crossing is the saddle above Thankot, now called Nagdhunga. It is not the only way over the western rim, but it is the lowest, the least exposed in winter and by a wide margin the easiest for loaded porters and pack animals. Thankot sits at the foot of it at about 1,301 m, on the flat, with water, with room to hold traffic. If you wanted to count what entered the valley from the west, this is where you would stand.
Thankot's role therefore has very little to do with the town's own size and everything to do with where it is. The same logic put a post at Sankhu on the north-east, at Chapagaun and the Lele saddle on the south, and at the Bhaktapur approaches on the east. Thankot is simply the busiest of them, because west is the direction the plains are in.