A 10 × 10 street grid has 184,756 paths that never backtrack. Dijkstra checks junctions, not paths.

To a computer a street map is a network: edges, the junctions that connect them, and a cost on every edge. The shortest path is the one with the lowest total cost, and Dijkstra's algorithm finds it by settling the closest junction first. Esri's route solver is built on the same idea.