Russia doesn’t lose all leverage the moment they shut off the pipeline. They still have the leverage from being able to turn the pipeline back on, which impacts competitors and customers by giving the option.
Blowing up the pipeline takes that option off the table for the foreseeable future, and with the advantage that it doesn’t cause immediate dangerous supply shocks to Allies since it was already off.
Win/win for the Allies (though if public, Western Europe gov’ts would have no choice but to be pissed in public), not great for Russia who has their last leverage knocked off the table.
I personally don’t have an opinion on if the US did or did not do it, and I doubt we’d know for at least several decades.
But the US has done lots weirder stuff with far less concrete potential benefits before. hell, nearly anything the CIA had been caught doing in the 60’s or 70’s has far less plausible justification!