In Germany this is actually law for car batteries. You pay a 7,50 € fee when buying a new battery and get a refund once you return a used battery.
And just for the record: Throwing away batteries has been illegal in Germany since 1991. Since that law was necessitated by a EU directive, I assume that is also true for all other EU member states.