The thinking for them doing it themselves is this is more a subtle threat like their polonium and novichok poisonings, but with less immediately political backlash (i.e. No article 5 triggered)
A "we have the capability to do this... lots of other pipes out there.... Have a pleasant day" sort of message.
There's other reasons Russia could have done it too. Drive a wedge between Germany and a country that would have a more obvious reason of hating the pipeline like US or Poland, make sure rapid return of relations and trade is harder to dissuade inner circle from toppling Putin or pressuring him to back down, etc.
We still have no idea, no top officials have made any accusations or presented any evidence, and just guessing from motives seems like a crapshoot. What we do know is one country is on an unhinged escalatory path, they're my very tentative guess without knowing exactly why they'd do it.
A "we have the capability to do this... lots of other pipes out there.... Have a pleasant day" sort of message.