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.
Others are reading
<a href="https://www.etymonline.com/word/whimsical">Etymology of whimsical by etymonline</a>
Harper, D. (n.d.). Etymology of whimsical. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/whimsical