Depending on the specifics, companies often don’t fix things because it would be more expensive, perceived or real, to fix the issue(a) than just dealing with the consequences of whatever it is being broken. Companies don’t operate on morals or principles outside of what makes them more money or what they think makes them more money.
Yes, those are problematic. This tends to happen when a pipeline changes payloads. I know a little bit about this: typically what they try to do is to shuttle the 'interface' to a segment long enough to contain it completely, then vent that section by opening a valve at the end of the section, then push new material in until the mixture reaches a certain level of purity.
Unfortunately, the mixture is useless and vented into the atmosphere. There ought to be a burden of responsibility to deal with that in a more ecological way on the pipeline operators, but these tend to be in bed with the nation states that are home to the pipes.
A pipeline carrying a single substance or single mixture of substances can still vent, usually that is to deal with pressure excursions and is a safety measure.
That word right there "potential" is the culprit here. As long as that potential is within "acceptable" ranges of unlikely to happen, nothing will be done.
China was the most blatant example I could think of, and it's a very current issue considering the ongoing Olympic games and the fact that much of the Western World outsources its production to China. There are plenty of other examples. Most equally valid.
We should check their tax filings to see if they use these leaks as losses on the balance sheets. Maybe the leaks are actually a benefit to the company?
Also: the party owning the pipeline has a pretty strong incentive to stop those leaks, it costs them money.