I've read that Tesla was swapping drive units and sending them back to the factory for analysis to determine the failure modes and improve them. Buying a new drive unit from Tesla might be kind of pricey, but there will be a secondary market with parts pulled from cars out of service, mostly wrecks. Additionally Tesla will have to expand their service from just their service centers by the time the Model 3 is out a couple of years. They can maintain a fleet of 50,000 - 100,000 cars with their current service centers. They will build more for the Model 3, but when there are over 1 million on the road, cars out of warranty will need other service options and Tesla will have to offer certifications to independent technicians. If they don't, they will get pushback from their customers.
They are keeping it all in house right now because just about all the cars are still in warranty (about the only ones that aren't are 2500 or so Roadsters) and they are still looking for patterns of failure. If all cars pass through a service center, they can collect data on every problem customers experience and make fixes to prevent them. Elon Musk has talked about this being a multi-stage process, first build an electric car that was fun to drive, though small and expensive, then build an electric sedan that was better than almost every other sedan out there in most categories, then do the same with an SUV, and finally introduce an affordable family car. The Model S and X were sort of phase 2a and 2b, but each phase increases volume by 1-2 orders of magnitude: build Roadsters in the thousands, Model S/X in the 100,000s, and the Model 3 in the millions.
Tesla's long term goal is primarily to build electric cars for the masses that people want. Not just the green crowd, or the techies, but the mass public. Elon is also a perfectionist who wants to build cars to aircraft tolerance with new technologies, but when push comes to shove he wants to make affordable cars for the masses first.