I got this question from Aardvark and gave a speculative answer
i’m not sure, but it may go back to the greek definitions of comedy and tragedy, which are different from ours today. for the greeks, a comedy is a drama with a happy ending and a tragedy is a drama with an unhappy ending. either can have laughs in the them. there’s more to it that i forget (tragedy involves a hero succumbing to hubris – that is, getting arrogant – and having a downfall, comedy probably had “plot rules” too), but the point is that those terms have changed. …. I think Shakespeare comedies may be the same thing: stories with happy endings and not necessarily the funny ones.
but what’s the real answer?