If you do a quick job search, those places have the most jobs in Auto and also the highest wages.
https://www.thelocal.de/20150924/what-the-vw-scandal-means-f...
Germany is the home of Mercedes, BMW, and VW (which owns Porsche and Audi and is one of the largest car manufacturers in the world). Their economy is very dependent on the auto industry. They are also home to many automotive suppliers including bosch and kuka. They are also one of the largest markets in Europe.
So yeh it's all these reasons: logistics, infrastructure, talent. Plus they need German's to think of Tesla as a local brand. Imagine if Tesla is gutting market share from these other companies and they were in another country. It would engender resentment.
Plus Berlin is a cool city :-)