adding to your point, core engineering courses themselves are unpopular among Indian students for alot of reasons. most people see courses like mechanics, electrical engineering as same stuff that they slogged through still 12th and as they enter undergrads they want to move away, so they end up taking CS, cause CS is actually pretty different from what they have studied till that point.
most institutes also really lack infra to make these streams interesting, core courses are much more hands on type of study, instead colleges still reach like how they would in schools , industry collab is pretty important , hardly any colleges even have proper labs and workshops. Most students from core streams end up, grinding programming in 1.5-2 and switch to CS after degree.
it's the $ and euro billing that determines the salaries in the engineering field.
to add a bit of out of box fun to the convo...
to explain this in engineering/physics terms, the amount of money an engineering vertical makes is indirectly proportional to friction(physics wala definition) they have to deal with. more the friction interferes with their work, lesser money they make. energy is needed to overcome fiction, which raises operational cost, prolongs RoI, lesser profits.
for example in logistics :
aircraft related trades, deal with least friction hence get paid most.
ship related trades, deal with higher friction and paid little less than aircraft wala trades. (optimal tradeoff between time and volume)
land related trades, deal with most friction and least paid among the three logistics verticals.
when it comes to core engineering and CSE. between the two, CSE wallahs hardly deal with friction since their trade solely depends on electronic communication on a daily basis, while core engineering wallahs have to constantly work against gravity and friction. which ultimately reflects in their take home salaries.
to sum up, the less an engineering vertical has to "fight" friction—physics(wala definition) or operational—the more it can channel resources into profit and take home pay.