With India specifically it's also about local manufacturing to avoid duties (India has a very protectionist policy and it works due to the size of the market.
With regards to learning to move operations, that's not as viable as it may seem. There are only a few places in the world where mass manufacturing of electronics is viable (China, Vietnam and to a much lesser extent India). You have Korea and Japan too, but those are high cost economies.