Why is sewage released into rivers and the sea?

Companies are allowed to release raw sewage during bad weather, but the amount spilled has doubled.

Source