Pathfinder works in different resolution depending on distance.
At furthest distance it only calculates less excact path, small obstacles or so 'are not seen' at this first rough estimation.
When unit gets nearer to goal the resolution increases and a more excact path is calculated.
In extreme cases the "rough path" and "excact path" do not fit with each other, causing the unit to endlessly walk back & forth or suddendly finding itself close to goal but on the wrong side of a cliff.
/e lamer's mantis link explains it better