It might not make sense for every country to demand things like this, but that doesn't mean it doesn't make sense for giant countries too, and it doesn't make it inefficient.
At India's scale costs are already amortized anyways, but worse, consider India's physical location. It's surrounded by hostile nations (Myanmar, China, Pakistan, make a wall around it). To get data out of the country you're talking about moving it through hostile territory, or moving it through vulnerable subsea cables. Not only is the bandwidth probably more wasteful than the extra compute needed to spin up another set of servers to serve the billion people in India, but the network cannot be relied on to keep working during any sort of crisis.
Luxembourg or whatever demanding all data processing happening internally would be meaningfully different. It's less than a million people to amortize over instead of more than a billion. It's next door to allies which the data could reasonably be stored and processed in, instead of isolated. But we're not talking about whether or not Luxembourg should demand this, we're talking about whether or not India should.