Why doesn't he destroy the pipelines going through Ukraine then?
Because then it would be clear who did it. A sabotage in the baltic sea makes it more difficult to find the culprit and probably causes [intentional] blame of countries that might benefit from shut pipelines.
Putin seems to be staking his entire regime on this war and likely feels that upping the stakes is to his benefit. His odds of winning a conventional military victory are looking more and more slim, but ratcheting up the risk might get the West to back down, at least in his mind.