Approach and Avoid
Every living thing, down to a bacterium swimming toward sugar, sorts the world into "approach" and "avoid."
Neuroscientists like Antonio Damasio trace this to homeostasis.
Good is whatever keeps the organism within the range where it stays alive.
Feelings are how the body reports how that's going.
Your own framework puts it more sharply: valence isn't something the world hands you. It's computed, roughly as whether prediction error is getting better or worse over time (Joffily & Coricelli 2013).