The concept of good is defined by the brain based upon the scale of imminent danger. Humans have become so complex that we have formed our own artificial structures of threat, threat is scaled upon by the human as bad, the opposite of bad defines good. good is artificial because we create it from the threat that faces us but because we are so complex we have adapted our nature of threat to consume everyday human lifestyles.
Some humans are able to withstand threat more than others which in turn causes the ratio of good and bad happenings to change (I mainly got that from people who take risks all the time).
Though my human knowledge over the concept of good ends there I believe the brains also tries to balance it, be it if you're too unhappy or happy.