Our reward centers evolved in an environment where nutrition was hard to come by and exercise was a daily fact of life already.
Our bodies use of exercise for healthy regulation of our mental state is probably an evolved dependency of that life as well.