According to Medical News Today, a negative mood can be good for your memory.
People in a positive mood such as happiness were shown under experimental conditions to have relatively unreliable memories, and show poorer judgement and critical thinking skills.
By contrast, those who experienced a negative mood such as sadness were shown to provide more reliable eyewitnesses accounts and exercise superior thinking and communication skills.
Speaking from personal experience (as if anything in this navel-gazing blog isn't from personal experience!), I have a freaky ability to remember things observed, whether they happened 30 years ago or yesterday. I am also a pretty negative person, in general.
So maybe there is a connection, and a little grumpiness isn't so bad for us after all. ;-)