Multiple reasons. Price, Services and VFM attitude of Indians. It's too expensive for most people to buy. For example the for the price of one XS Max 512, you can get 2 Samsung Note 9 512 GB and still have some money left. The recent price cut on XR might help them fight with Samsung. Apple services have no value in India. Maps, Siri and many other apps are useless. Maps is outdated and does not offer directions. Siri cannot understand accents and lot more. And one of the most ridiculous thing is 150 MB download limit on cellular data. Data is very very cheap and Apple forces you to download via WiFi which is not available everywhere. Indian market is price conscious. Most people see value for money factor in buying everything. Why pay 2-3 times more for an iPhone when much cheaper One Plus or other flagship phones are available?
It’s not really got anything to do with VFM. Maybe to some extent it does matter. But by and large not many Indians have this kind of paying capacity, VFM or not. People in India who can splurge do indeed buy the best iPhones, but the number of such people is far fewer than you’d find in other countries.