Herd Mentality is just one of the reasons. Due to several economic and political factors, India has not been able to generate ample jobs in other sectors like the IT sector (compared to population growth). Hence, most of us did not have the option to become something else for the fear of ending up with bankruptcy, hunger, unemployment and it’s related stigma. Yes! most of us take loans to study, in a country, where almost a third is extremely poor as per international standards.
For engineering,most other branches would either require you to go for a masters/PHD abroad for opportunities post graduation (ex: BioMed, Automobiles etc.) or would require some investment on your part (ex: Civil) or you may end up with a job that doesn’t pay you well since, there aren’t too many high paying jobs in that sector.