They made the most of a wage arbitrage led business model that was driven in part by the Rise of the Internet.
They made the most of the Gold Rush during Y2K which led to a burst demand, the likes of which haven't been seen again. This ensured they engaged with clients who otherwise weren't even thinking of outsourcing.
Over a period of time they optimized delivery to ensure consistent delivery and a broad bouquet of service offerings.
I'd venture to say if the Indian outsourcers didn't exist, there would no StartUps of note in India. That foundation and availability and progressive maturity of tech talent is an important ingredient of todays successes.
TCS has a product business (BanCs & iON), Infosys has Edgeverve (Finacle). Other product companies exist which have been moderately successful - Intellect Design (Polaris), NewGen, etc.