They want to avoid India becoming another China
And developing their own non-Google solutions to everything and locking them out of grabbing data from another billion people. They're hoping if they make a big splash about investing billions in India it will make their government think twice about supporting "local" software projects that limit their dependence on foreign monopolies, or at least make Google a tacit exception to that policy.