Behold I have set before you today life and good on the one hand and death and evil on the other... choose life.
Devarim 30:15-19
It is not always clear that good behavior leads to blessings and life and that bad behavior leads to curses and death. This allows us the free will to choose to be good. If it were always clear that good behavior leads to blessing and life, whereas bad behavior leads to the opposite, what choice could we have but to be good?
For this reason, on a deeper level, G-d (through Moses) is here asking us to be good for its own sake, rather than for any expectation of material reward even when we do see clearly that being good leads to good results.
From Kehot's
Chumash
Synagogue Edition