This is the best way to learn new things (besides spending time face to face with an expert tutor). You have a motivating problem, an idea of where you are going, and a whole graph to traverse backward until you fit the pieces together. You will remember the parts you come across because they are connected together (both forward and backward), and you will be working closer to the edge of your capabilities. It is much easier to achieve flow doing this kind of learning.
If you have too many unconnected edges in the graph, then sometimes you have to give up and pick a closer/easier subject to study, but the time spent was still not wasted, as it provides useful orientation for future attempts.
Not sure how well it works if a lecturer or textbook is guiding you though. The whole point is picking your own problems and questions, and then figuring out how to solve/answer them.
> I once knew a successful person who told me "I never start a project I can't fool myself into thinking I can complete within a weekend"
Not sure about “never”, but doing many of these little projects is often a more valuable use of time than banging against a project whose scope is so big you have no idea where to start.