"that which is lacking in sense, language or words without meaning or conveying absurd or ridiculous ideas," 1610s, from non- "not" + sense (n.); perhaps influenced by French nonsens. Since mid-20c., non-sense, with the hyphen, has been used to distinguish the meaning "that which is not sense, that which is different from sense," not implying absurdity.
compound adjectival word-forming element, usually interchangeable with -ic but sometimes with specialized sense (such as historic/historical, politic/political), Middle English, from Late Latin -icalis, from Latin -icus + -alis (see -al (1)). Probably it was needed because the forms in -ic often took on a noun sense (for example physic). Forms in -ical tend to be attested earlier in English than their twins in -ic.
<a href="https://www.etymonline.com/word/nonsensical">Etymology of nonsensical by etymonline</a>
Harper, D. (n.d.). Etymology of nonsensical. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/nonsensical