Too-short time horizons lead to bad decisions.
Imagine a given plan as being a path, where the height is the value of that point.
Imagine comparing two possible paths: one that has a slight linear increase, and one that has a very slight dip, but then a compounding improvement, and is quickly orders of magnitude beyond the linear path.
If you have a long-enough time horizon, you can clearly see that the latter is much better.
But if you have a too-short time horizon, all you will be able to see is the dip of the latter, not the imminent peak.
A short-term optimizing agent can never climb down a hill, even if it would bring them to the foot of a much larger peak.
Another reason short time horizons lead to bad decisions: real-world paths are not straight. They loop around semi-randomly in the details, but have consistent large-scale arcs.
Imagine looking 10 time steps ahead and a vector from here to there: the vector remains pointing in mostly the same direction even as your short-term path jiggles randomly.
But if you look 1 step ahead and do the same procedure, your vector will swing around chaotically.
Of course, this does not mean you should always think exclusively long-term. A couple of reasons why it's possible to think too long-term too:
If you're going to die in time step 2 without an intervention, then thinking about time step 10 is a dangerous distraction.
You have to clear the bar of survival to even be a going concern in timestep 10!
Things get less certain over time at a compounding rate. 10 steps ahead is in much less resolution than 1 step ahead.
Still, if the result is orders of magnitude different, you can see it clearly even with the extra noise and uncertainty.