Both those guys were hardened criminals on their way to the Wall when they were captured by Lannister forces. It's not like Arya killed some perfectly nice guy they happened to run into. They were quite likely the ones who'd torched that house in the first place.
I wouldn't say it was strictly a self-defense situation, but it was pretty close.
Not everyone who goes to the Wall is evil. Gendry was on his way to the Wall and he wasn't a criminal. If I was being sent to the Wall, personally, I'd try to escape and if they caught me, they'd have to cage me too to keep me there. Rouge could have been in a similar situation. Then some kid comes along and doesn't set him free? That would aggravate me. Though I wouldn't have said what he said, words uttered in a time of despair shouldn't be a death sentence.