Comedies usually finish up with a happy ending. Few of them are as insistent on it as You Can't Take It With You, which actually concludes with Grandpa saying, explicitly:
GRANDPA: Everything's turned out fine as it usually does. Alice is going to marry Tony. Mr. Kirby who's turned out to be a very good egg sold us back our house; he'll probably forget about big deals for a while. Nobody on our block has to move, and with the right handling I think we can even thaw out Mr. Kirby in time. We've all got our health and as far as anything else is concerned we leave that up to you.
Grandpa's addressing God in a prayer at the dinner table—but he could just as easily be addressing Frank Capra, who's the one who carefully sets things up so everyone is happy and you know it. In You Can't Take It With You, good people prosper, there aren't really any bad people, and Grandpa makes sure to tell you the moral of the story.