Berlin is in the east of Germany. I live in Berlin, and have considered cycling to Poland and back as a day trip.
One of my German coworkers remarks often that wages for any given job in former-DDR-areas are much lower than the same jobs in pre-reunification-Bundesrepublik-Deutschland-areas.
West Berlin was a political enclave in DDR. ~150 km from the inner German border [1]. Just outside Berlin is pretty much ex-DDR territory. At the same time Berlin does have quite a strong foreign community and high migration, lately negative for Germans and positive for other ethnic groups [2]. It is the second largest city (by population) in Europe after London with much lower living costs [3]. Also Daimler and BMW have strong presence in Berlin. Those factors may have influenced the Tesla's decision a lot.
When it comes to the Tesla factory, it will be right outside Berlin https://www.dw.com/en/tesla-factory-outside-berlin-to-cost-4... .