Germany has an interesting system that is actually quite ancient. They pay an income tax of 8 or 9% (depending on where they live), which is then distributed to the religious group of which the person indicates they are a member. If you officially declare yourself to not be a member of any religious group, you don't pay the tax.
From what I've read, the church tax goes back to the early Christian time where chiefs of Germanic tribes would collect money from the whole tribe, and then distribute it to the priests. This continued through the middle ages and renaissance when princes would impose a tax for the support of churches, and it continues to this day.
In my opinion, the church tax has completely outlived its usefulness. It now creates a grotesque incentive on the part of German clerics to try and change Church teaching in order to placate people, and convince them not to leave the Church (and thus lose revenue). Additionally, as others have mentioned, it has also recently caused German clerics to impose a kind of simony where you are actually denied the sacraments if you don't pay the tax.
According to some sources, German NO bishops have an average monthly salary of about $8,000. Given that at least 70% of church revenue in Germany is attributable to the church tax, it's no wonder the NO clerics will do whatever they can to keep the money flowing. Greed does horrible things to people.