(Bloomberg) -- When Daimler AG announced a 200-million euro ($227 million) investment in a car-battery plant in Poland last month, a top executive called it a  sign of confidence in the country. After all, like Daimler's home, Germany, Poland is a member of the tariff-free European Union.

The decision to expand in the city of Jawor “shows how well we feel here in Poland,” management board member Markus Schafer said after meeting with Prime Minister Mateusz Morawiecki.

He was talking about a country whose leader has said the EU is an “imaginary community” from which Poland doesn’t gain much, and accused the political opposition and EU President Donald Tusk of representing “German interests.” In an unprecedented move, the bloc's executive sued the Polish government in 2017 for failing to uphold the rule of law.

The explanation for the apparent contradiction lies in the numbers. Trade between Poland and Germany, by far the EU’s largest economy, has quadrupled to almost $130 billion in a decade and a half. Companies from Volkswagen AG to Deutsche Lufthansa AG have poured money into Poland since it joined the EU in 2004.

“Ties with Germany are even stronger than few years back and links with other EU members and China are more intense via orders from Germany,” said Jaroslaw Janecki, chief economist at the Polish unit of Societe Generale SA.

German dependence is even more pronounced for Hungary and the Czech Republic, two other EU members who are at odds with the rest of the bloc over European rules on human rights and civil liberties. Hungarian Prime Minister Viktor Orban has accused the EU of trading away democracy for liberalism, and says the European Commission, the executive body,  wants to make Europe into a continent of immigrants, which he has said would lead to the “fall of Europe.”

Czech Premier Andrej Babis says his country doesn’t need the EU meddling in its affairs. But the business empire he founded benefits vastly from EU farm subsidies and his country exports more parts and supplies to Germany as a share of production that any other country save Hungary.

Policymakers in Prague, Budapest and Warsaw also are watching with interest Britain’s chaotic Brexit process, even though none of the three favor leaving the bloc. When financial investors from London visited Eastern Europe for a routine country visit last month, government officials in all three capitals spontaneously began asking about the effect of the divorce. 

Piotr Kalisz, a senior economist at Citigroup Inc. in Warsaw, pointed out that one factor driving the rise in foreign direct investment in Eastern Europe, the lion’s share of which comes from the EU, is the tariff-free, homogenized regulatory system in the bloc. 

“Take Poland, which remains an emerging market, and eliminate legal and product standards and the free flow of goods and see what happens to FDI,” Kalisz said. “Look at the consequences the U.K. is facing, and that’s not a level we could compare ourselves to.”

--With assistance from Samuel Dodge, Zoltan Simon, Michael Winfrey and Barbara Sladkowska.

To contact the author of this story: Marek Strzelecki in Warsaw at mstrzelecki1@bloomberg.net

To contact the editor responsible for this story: Anne Swardson at aswardson@bloomberg.net

©2019 Bloomberg L.P.