Triathletes swim 2.2 miles. That’d be really boring in a lap pool.
They could have relocated the triathlon to a cleaner river, or the same river nearer the coast
I looked up where London did their triathlons since they also have a river flowing through the city. It turns out they held it in Hyde Park where there is a lake called the Serpentine. The swimming part was a lap of it so back and forth across it I assume. No mention of any problems in the wiki article on it. This event could have been held I’m sure in a number of locations around France much better than the filthy Seine.
If water sports are being conducted in a river, wouldn’t there be concerns about how the current would affect the outcome? Better to use a lake or a canal.