Dante called the poem "Commedia" (translated as "Comedy" with
the adjective "Divine" being added later in the 14th century)
because poems in the ancient world were classified as High
("Tragedy") or Low ("Comedy").
Low poems had happy endings and were of everyday or vulgar
subjects, while High poems were for more serious matters. Dante was
one of the first in the Middle Ages to write of a serious subject,
the Redemption of man, in the low and vulgar Italian language and
not the Latin language as one might expect for such a serious
topic.
Our word comedy has moved on and does not equate to the commedia
of Dante.