Anish Tomar is applying for a job with the Indian government. He’s familiar with the process – it’s his seventh attempt to secure a government position. As always, the competition is tough but this time he’s even competing against his wife for the role as a medical orderly for Indian Railways.

The job is a relatively lowly position, but it will still attract hundreds, if not thousands of applicants. It was the same with Tomar’s previous attempts to get a government job. He is not fussy – he has previously applied to be a teacher and a forest guard, but both ended in failure.

“I didn’t clear the physical test for the forest department,” the 28-year-old says.

He’s currently working as a marketing executive at a healthcare company in Bhilwara – a mid-sized town in Rajasthan, northern India, known for its textile industry – that pays him 25,000 rupees ($370, £273) per month. He feels overworked and underpaid. “I even have to answer calls in the middle of the night,” he says. “There’s no time to rest.”

For someone like Tomar in small-town India, the chance to land a government job is worth fighting for. These roles comes with job security, a roof over your head and free medical support for your family. There are other perks too, such as travel passes for the employee’s entire family. Importantly, the only restrictions on this perk is that the family members need to be dependents, but as Indian families can be large this can quickly add up.

After a wide-ranging civil service pay review in 2006, starting salaries are also competitive with the private sector. If Tomar got the job he is after, which involves working in a hospital run by India Railways for its employees, he could work his way up to a monthly wage of 35,000 rupees.

So the fact that people respond in droves when departments like the railways or the state police start hiring is hardly a surprise. The number of applications can dramatically exceed the number of available positions.

The numbers were so overwhelming that state officials shelved the recruitment drive, as it would have taken them more than four years to interview all the candidates

Tomar will need a bit of luck to get the India Railways job, as there are – on average – more than 200 applicants for each role. In March, after a three-year lull, the Railway Recruitment Board put out nationwide advertisements for about 100,000 available posts, including trackmen, porters and electricians. Over 23 million people applied.

This overwhelming response is not an aberration. A few weeks later, 200,000 Mumbai residents applied for 1,137 openings for constables, the most junior post, in the Mumbai Police. In 2015, the state of Uttar Pradesh received 2.3 million applications for just 368 clerical jobs in its local government secretariat. That’s 6,250 applicants per post.

The numbers were so overwhelming that state officials shelved the recruitment drive, as it would have taken them more than four years to interview all the candidates.

In many cases, the candidates applying for these roles are hugely over-qualified ­– a significant proportion of the applicants also held engineering or business degrees. Yet, to be eligible for the local government role, candidates needed only the ability to ride a bicycle and to have attended school up to the age of 10.  To qualify for any of the 100,000 available railway jobs, candidates had to have finished high school.

What is drawing so many overqualified people to these jobs? There must be more on offer than just the wages and perks.

For those lucky enough to land a government job, it can also mean a higher standing in the arranged marriage market. It is a situation depicted in the 2017 film Newton, which was India’s official entry to the Oscars. In the movie, actor Rajkummar Rao’s eponymous character finds his humble government posting is an advantage in the search for a spouse.

“Her father’s a contractor and you’re a government official. It’s a life of luxury,” Newton’s father says. “They’ve also offered a one million rupee dowry and a motorcycle,” his mother adds.

The railways, in particular, occupy an important space in India’s cultural psyche. Think of travelling across America and road trips come to mind. For India, it’s travelling by train. According to an article in August 2017, the Indian rail system transports more people in its air-conditioned carriages (trains also have non-AC cars) than all domestic airlines combined.

There are also towns like Gorakhpur and Jhansi, in Uttar Pradesh, and Itarsi, further south in the central state of Madhya Pradesh, that owe their development to their rail connectivity. And in the Indian hinterland, government service has traditionally been admired.

“These areas were originally agrarian and feudal societies, where being employed with the government carried social prestige,” says Amitabha Khare, who is executive director of the Railway Recruitment Boards. “This mindset persists even today.”

This is evident when you look higher up the ranks of the Indian civil service, such as the elite Indian Administrative Service (IAS). The Central Indian states, Uttar Pradesh and Bihar, regularly churn out the highest numbers of successful IAS applicants each year.

And according to a senior railway officer who spoke under the condition of anonymity, on average 15,000 employees of the railway service apply each year to get posted back to their hometowns. “Most of these applications are for transfers to Uttar Pradesh and Bihar,” he says.

Yet this cow-belt region around the Ganges suffers from among the highest rates of poverty and illiteracy in India. Having a job with the government offers people the opportunity to get transferred back to the area where they grew up rather than continuing to work elsewhere.  

Add overpopulation and job scarcity into the mix, and what results is a frenzied and almost obsessive pursuit by this demographic for any government job. DT, a constable in the Railway Protection Force (RPF), was selected on his 25th attempt to find a job in government service. He had previously applied to the Indo Tibetan Border Police (ITBP) and the Indian Army.

His colleague and fellow constable JS spent four years applying to various departments including the Uttar Pradesh state police and the Central Industrial Security Force (CISF). At the other end of the spectrum, this year’s IAS top-ranked recruit, 28-year-old former Google employee Anudeep Durishetty, took India’s civil service examination for seven years in a row before finally getting in.

Applying for a government job in India can also be a family affair. Constable JS’s wife is currently studying to be a government school teacher back in Ghaziabad, Uttar Pradesh, where the couple grew up. “I will apply for a transfer in a year or so, when she finds a job,” he says.

And what about Anish Tomar’s spouse, Priya,  who has also thrown her hat into the ring for the medical orderly role with the railways? Rather than seeing herself as competing with her husband, she may be increasing the chances of someone in the family getting a coveted government job.

“Why not?” she says. “The starting salary is very good, and the job will bring prestige and dignity to my family.”

*DT and JS did not want their full names to be used.

 --

To comment on this story or anything else you have seen on BBC Capital, please head over to our Facebook page or message us on Twitter.

If you liked this story, sign up for the weekly bbc.com features newsletter called "If You Only Read 6 Things This Week". A handpicked selection of stories from BBC Future, Culture, Capital and Travel, delivered to your inbox every Friday.