To offend is to collide. Latin offendere combines ob- ('against') with -fendere ('to strike'), producing 'to strike against' — to stumble, to bump into something. An offender was someone who tripped.
The physical sense came first. A Roman who offended struck their foot against a stone. The moral sense followed naturally: to offend against the law was to stumble into wrongdoing, to collide with a rule. The emotional sense — causing hurt feelings — arrived last, and is now the most common.
The root -fendere generated a compact family of combat words. Defend combines de- ('away') with fendere: to strike away, to ward off blows. Fence is a shortened form of defence — originally a barrier that repels attackers. Fend, as in 'fend for yourself', means to fight on your own behalf.
The Proto-Indo-European ancestor *gʷʰen- meant 'to strike' or 'to kill', and its descendants are scattered across languages. In Greek, it produced phonos ('murder') and the suffix -phone in English words like cacophony. Through Germanic, it may have contributed to the word gun.
The legal distinction between offence and defence preserves the Latin spatial metaphor perfectly. An offence is a strike against the law. A defence is a strike that wards it off. The courtroom, like the original Latin, is built on collision.