I’m sure that Mrs. Hudson’s husband committed a great number of crimes in order to get sentenced to death. From the way she flinches when Sherlock slams his hands on the table, I’d say it’s safe to bet that one of his many crimes was spousal abuse.
That would certainly account for why Sherlock ensured his execution.
And why Sherlock got so enraged when he saw that she had been hurt
“I definitely think he might be mad but he was also strangely likeable. He was charming. It really was all just a bit strange. So tomorrow, we’re off to look at a flat. Me and the madman. Me and Sherlock Holmes.”