The joke is a pun.  Buying and selling stolen goods is illegal and police and courts would mark any instance of that as an 'offense' against the law.  To do or say something 'offensively' is to do it in an actively aggressive or attacking manner.
' ' Do you buy and sell stolen goods ? ' ' asked Tom offensively .