Why is sewage pumped into rivers and the sea?

What is being done about raw sewage discharges into rivers and the sea?

Source