Well sewage has to be dumped (especially in storm conditions), and the water companies have licences to do so. However Thames was found to be in breach of the license, so were fined.
Many people claim these things happen because "shareholders" however it was completely widespread practice to dump sewage before privatisation and the system is literally designed to do so. This doesn't make it OK, however.