After completing graduation, many students of IIT get jobs in top companies too with good packages but some of them leave these high paying jobs and join grad schools for PhD. Working in these companies and earning six figures can be great but earning less than half of it while studying isn't bad too. As after completing your PhD, you will get a job with a higher salary but still, a person who has already worked for 6 years in a company will earn more than you. So people don't opt for Ph.D. just for a higher salary, there are other reasons too.
Interest in Research
Thus, students willing to study and research more about a particular topic or subject, they go for a higher degree. For these students learning about the subject has a bigger priority than high-paying jobs. It depends completely upon the individual and their interests which makes them either go for a PhD or a high paying job.`