An optimal answer to the whole problem is built from optimal answers to its subproblems.
The cheapest path to a grid cell extends the cheaper of the paths to its two neighbours. Without this property, storing subproblem answers does not give a correct result.