(On the other hand, having run into the problem in various forms 'irl' probably did make reading the description/solution in Knuth more intelligible and well motivated, compared to if I had just sat down and read every one of his books first.)
That's definitely the case for me. I find that I don't have the internal motivation to sit down and read a lot about a given subject until I've been faced with some real- world problem that turns out to be really hard without more knowledge of that subject.
In fact, I just assume from the start that every single problem I face in programming, no matter how large or small, has already been found and solved by someone else, and written about in a book or posted about on the internet. It's not like I'm trying to create real AI or prove P=NP or anything, just building apps.