Operational Need and Filling Capacity, especially area served by a Particular City.
It's not always necessary that most populated area would have the necessary economic segment of people required to fill a train.
Example is Nagpur Vande Bharat. Running through most populous area of Chattisgarh, providing connection with Rajdhani/Duronto Trains at Nagpur for further traveling. Still failing to gain patronage.
Solapur also has good...
more... population, but Solapur Vande Bharat Express is able to touch 90% Occupancy rate due to Economic Segment of Pune. Pune has various dedicated Economical Intercity alternatives, catching Vande Bharat Express for Mumbai from Pune doesn't make Economical sense especially pricing wise still it's getting patronage.
Sai Nagar Shirdi doesn't have much population to boast about but it has filling capacity for trains, that Vande Bharat is also having more than 75% occupancy also considering generous contribution from Nashik.
Even Varanasi has lesser Population than Ghaziabad, Kanpur, Meerut, Agra and Lucknow.
Are you seeing it getting reflected anywhere in patronage of trains from Varanasi ??