Full quote for context:
My mama always said life was like a box of chocolates. You never know what you're gonna get.
I understand the surface meaning of this line. Boxes of chocolates contain a variety of shapes and flavors, and if you grab one, you could get anything. Life is unpredictable. That's how I've always interpreted the line.
However, I recently realized that you do know what you're going to get with a box of chocolates. Most of them come with a card or a printing that tells you which chocolate is which, and as far as I can tell, this was commonplace by the time the movie came out in 1994. So is it meant to be funny to an audience that will hear irony in the line?
On the other hand, Forrest grew up in the 40s-50s, at which time I don't think those cards existed in boxes of chocolates. So it would make sense as something she would say. And Forrest's mother, unlike Forrest, is not made out to be unintelligent herself. But we only hear the line through Forrest's retelling, so the humor could be in his misremembering a quote in a way that makes it completely untrue.
The more I think about this, the more likely I think it is that the line is meant to be a joke (to be clear, a joke told by the film itself, not a joke told by the character of Forrest) - it's not particularly poignant, so its cultural staying power is surprising to me unless I assume that it's meant to be funny. And I think it is quite funny when viewed with that lens. But I'm just not sure if the general public has been viewing it that way.