There is a big difference between getting education for Vocational reasons and Academic reasons.
Vocational training is training that you can apply immediately to a job; it tends to be somewhat practical. For example, plumber, electrician, MBA, accounting, automechanic, physician, nurse, computer programmer. For Vocational training, you go to school to learn how to do something in particular, so that once the training is done, you are qualified to go and do it. I think most people view undergraduate degrees as something vocational.
Academic education, in contrast, is learning for the sake of learning; perhaps "advancing human knowledge" is the best way to say it. For someone who views life with a utilitarian philosophy, most PhD's, like poetry and video games, are not at all useful.
So in summary, your questions:
Why do so many people apply for a PhD even when chances of getting academic jobs are slim?
Answer: Because a PhD is not a vocational degree; it is an academic degree
Why do so many people still apply for a PhD in some reputed institutes in India even knowing the harsh reality?
Answer: If someone is unhappy with reality, perhaps advancing human knowledge is a means to fix the dismal reality many people face. And particular institutes, IIT for example, are reputed because they have contributed much to the improve human condition. There are people who work not for material reasons but instead to improve society as a whole.
Are people jobless after a PhD?
Just like people everywhere, joblessness can indeed effect PhDs. There certainly isn't a 100% employment rate in any group of people, is there?
Likewise, most people who have a PhD are able to find a job. However, I am willing to wager that on the whole, people who get vocational degrees earn more money. For example, MBAs, Physicians, and CS people will earn more than most PhDs. In the end, many PhDs get a job in a field that can use their skills vocationally; for example, many physics PhDs go into computer science when school is done.
Completion of a PhD requires so much effort. So why is there no value after doing it?
There are many things in this world that require a ton of effort for which very little remuneration is received. For example, child rearing. Raising kids is a thankless task that most people do anyway. If society paid more money for what it values, shouldn't being a mother pay the most of any profession? In truth most mothers raise kids for a variety of reasons; sense of fulfillment, love, etc.
Likewise with PhDs, people pursue these degrees for reasons not related to remuneration. Perhaps we should re-organize society so that those we value the most receive the most money? Moms will get the most money, followed by poets, and everyone will pity the impoverished health insurance company executive?