In most European countries, the capital has historically also been the most important city and a place were businesses liked having their headquarters. Look at how London, Paris, Moscow or Rome developed compared to other parts of the country. If there were strong industrial centres outside the capital, these were typically due to natural resources; see e.g. the mining and steel regions in the English Midlands. Sometimes also, cities that relied heavily on trade grew to comparable economic wealth especially in more recent times despite not being the capital (see e.g. the harbour cities of the Netherlands, especially Rotterdam).
In the first half of the 20th century, this pattern held true in Germany. While the coal and steel industry was at home primarily in the Ruhr Area (Essen, Duisburg, Dortmund), while Silesia was economically active thanks to the textile industry, and while certain northern trade cities were also economically very important (especially Hamburg), the capital city Berlin was another centre of industry, among the economically most active parts of the country.
Then Germany elected a fascist government that waged war on most of Europe, lost, and was occupied by the winning alliance (Allies). They occupied the country in three, later four zones, dividing the capital equivalently. Unlike Austria, which was in a similar situation but was then allowed to fully reunite in exchange for promising neutrality, Germany remained occupied to varying degrees for 45 years; an offer was made for reunification in exchange for unification and deindustrialisation in the 1950’s but was rejected by the West German government.
Unfortunately for Germany, once the war was over the new geopolitical situation termed the Cold War began, showing that the alliance between the Soviet Union and the western Allies could only hold as long as there was a common enemy to defeat. As neither side wanted to give up their power over Germany while the other retained it, we arrived at the situation o.m. described in their concise answer: Half of Berlin was united with the surrounding Soviet-occupied zone, later the GDR, while the other half was sort-of but not really part of the FRG and under the protection of the western Allies.
A consequence of the new situation in 1945 was a number of companies abandoning their Berlin headquarters and opening new ones in clearly West German cities. Among them names such as Siemens (moved to Munich), AEG (Frankfurt), Loewe (Kronach in Bavaria) and many more. On the other hand, companies that were in the eastern part of Berlin or the surrounding areas of Brandenburg were nationalised by the new Socialist government.
Of course, this also led to non-Berlin parts of Germany becoming economically more powerful. The Ruhr Area retained its coal and steel industry, Hamburg kept its port and trade, Munich – being in the American sector which was seen as preferable by a lot of CEO’s – gained a lot of companies that fled from Berlin or other parts of the East, Frankfurt became home to a lot of private banks in addition to the already existing chemical industry and so on. In the 45 years of separation, these cities were able to develop much more dynamically than Berlin could.
Post-separation and post-reunification, many large companies relocated their headquarters to Berlin or opened up a branch there in typically brand new, shiny buildings. But the shiny headquarters only create very few jobs and the factories remained mostly where they had been. Thus, Berlin has a lot of catch-up to do which is very unusual for a European capital city.