Picture getting an HM Pokemon through a trade, before you get the HM. Conveniently, you have the right badge to use it. You get across the obstacle with the HM, then you delete it. You go forward and hit a dead end, by means of the same obstacle. You go back, and the obstacle is back. Uh-oh, you're stuck!