oh, good grief

How did "grief" ever become a "good" thing, I wonder.