Wayward paths can help us better understand the correct ones.
Very true, IMO. It's one of the reasons I love my algorithm textbook more than any other school textbook I've ever had: it not only explains why you choose a certain way of proving an algorithm, or how to construct an efficient one,
it gives you seemingly-logical, incorrect alternatives that people naturally fall into and explains why they're wrong. It actively helps you to recognize potential mistakes later, rather than having you stumble onto them without understanding why you made the mistake.