You know, I don't know what to do on the spot when somebody shows offence at my jokes. Apologizing indicates you think you did something wrong and makes an implicit promise to change your behavior (forever!). Not something to instinctively respond with or you end up apologizing for all kinds of genuinely harmless things and people will take advantage of that.