Programming a robot for every task in detail is slow and demands expertise. Learning from demonstration offers another way: a person performs the task, by guiding the robot's arm or showing the motion, and the robot learns the pattern from those examples rather than from explicit instructions.
This makes it far easier for non-specialists to set a robot to new work. The challenge is generalisation, since the robot must apply what it saw to slightly different situations rather than copying one performance rigidly, which is why a few varied demonstrations usually teach better than a single perfect one.