Ah, this has been a sore spot with current owners if you read the Model S forums.
The reason Tesla can charge that much is because Tesla is the only game in town to repair the vehicles. Sure, they claim they aren't making any money off service (like traditional dealers do), but that doesn't mean the service and parts are cheap. Service labor rates are like $175/hour at many Tesla SC's, and parts are very expensive, I am guessing due to the minimal economies of scale.
Also, if you pull parts off of a junkyard car to fix the car yourself, you might still not be able to fully do the repair. If the repair involves any software or firmware resets after the replacement part is installed, you have to take it in to Tesla to have that done. There are a few brave souls out there trying to hack Teslas software to allow 3rd party access, but that is still a work in progress.
It's currently a big issue that a lot of Model 3 buyers are going to get some sticker shock for, especially if they don't service their cars at the dealer normally (there are no independent Tesla shops right now). This situation might eventually get fixed, but if you get your 3 early on, expect to have to pay Tesla rates for service.
Here are the current service inspection visit costs for a Model S:
Service plans And that's just the regular maintenance, not out of warranty repairs. I sure hope they lower the rates for the Model 3, or this EV is going to be the most expensive car to maintain that I have ever owned