Knowing a destination is not the same as knowing how to reach it. Path planning works out a route from start to goal that avoids obstacles, respects the robot's limits, and is as short or smooth as the task demands, often from many possible paths.
The environment may be partly unknown or changing, so planners often work in stages: a rough global route, refined continuously as new sensing arrives. Good planning is why a robot glides around an unexpected obstacle instead of stopping dead in front of it.