The pollution killed around 150 bullhead fish after flowing into a tributary of the River Thames for at least 24 hours.
Judge Peter Ross branded the incident a "reckless failure" of the company to take sufficient action to prevent a spill.
The court heard Thames Water had ignored more than 1,000 alarms at the west Oxfordshire pumping station where the incident took place.
According to the judge, a culture had been created where employees interpreted a problem with the pump system as a problem with the alarm system.
"It's that failure to integrate the technological advances with human assessment, analysis and response which lies at the heart of the deficiencies that were created in this case,” he said.
"In order to be operated effectively there had to be a proper integration of the technology and human resources, adequate training for the latter and a culture ensures that the exercise of judgment is still undertaken by human beings."
The utilities firm, which has a turnover of £2bn, admitted to breaching regulations with regards to the incident in which sewage had entered a stream near Milton-under-Wychwood in 2015.
In his defence of the company, Kerim Fuad QC said prior to the spill there had not been an incident at the Cotswolds site since 1993.
He also noted Thames Water operated more than 4,700 pumping stations across its range, but Judge Ross branded this detail “irrelevant”.
"Any loss of fish or damage to the environment short or long term is extremely regrettable but the cause of this unfortunate event in many respects remains unknown,” said Mr Fuad.
Judge Ross said pollution risk must be managed at each site, regardless of how many there were.
Mr Fuad told Oxford Crown Court on Friday £40 million had been invested by Thames Water in improving waste water sites, and the company had demonstrated deep regret for the spill.
He also compared the incident to previous convictions for Thames Water, including a record £20m fine imposed at Aylesbury Crown Court in 2017.
Hundreds of fish as well as birds and dragonflies were killed by that spill, in which sewage flowed into nature reserves, bringing with it nappies and other debris.
"Had lessons really been learned and implemented from the events in relation to the two previous convictions then this would not have happened,” he said.
Responding to the ruling, Richard Aylard of Thames Water said: “We take our role in protecting the environment extremely seriously and are really sorry for what happened here in 2015.”
“We have made a series of improvements since this regrettable incident, including bringing in more people, more maintenance, more training and better systems. In the three-and-a half-years since, we have not had a serious incident at any of our 4,700 pumping stations.
“We would like to reassure our customers that we continue to innovate and drive further improved performance right across the business, to help us achieve our ambition of zero pollutions.”
Additional reporting by PA.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies