For many people migrating for work to Germany it's quite surprising, or even shocking, that they are asked about the confession by the employer. They are usually not informed about the consequences, and most people answer according to the formal (and not subjective) fact that they are baptised, even if they are atheists or agnostics.
However, being aware about the church tax in Germany, many people prefer to state they are confession-free (Konfessionslos), because they feel they are not the members of the Church (no religious activities).
On the example of Poland, formally, anyone baptised in Catolic Church is the member of the Catolic Church, and formally leaving the Church is practically impossible (according to people who have tried). So, formally any worker from Poland, that was baptised and arrives to Germany, is Catholic.
What are, then, the consequences of declaring yourself atheist based on your conscience, not on the formal state? You will not be registered for Church Tax, but if the tax office would want to "proof" the religious membership, they would get answer, that the given person "belongs" to the Catholic Church. Will any actions be taken against such person, or the actual state would count as more important than the formal one?