I came across the List of by-elections in the UK and noticed that there was a by-election in West Tyrone in 2018. Nothing unusual about that except that the seat was won by Sinn Féin in the 2017 general election and the incumbent resigned (in UK legal fiction: was appointed Crown Steward and Bailiff of the Chiltern Hundreds—an even more amusing side-fact!) in the aftermath of a social media scandal.
Sinn Féin are by default absentionist so Barry McElduff never actually sat in Westminster. While I would perfectly understand a politician resigning if they were doing day to day parliamentary work it seems entirely pointless for somebody who is not. In effect, McElduff lost nothing by resigning. While Sinn Féin did hold on to the seat, they could have lost the by-election meaning an MP would go to Westminster for West Tyrone which would run contrary to their abstentionist policy so even they had something to lose.
Thus why would an absentionist Sinn Féin MP even bother resigning?