The minor pentatonic is a 5 note scale that exists inside many other scales ( blues, aoelian, phrygian, dorian, etc..). What David has probable done, & this is a common technique, is to construct a solo using the minor pentatonic and then "borrow" notes from other scales for added color. Scales are not laws (couldn't think of a better analogy), but merely blueprints of sounds to help us create.
You sound like you have a very inquizitive nature about you, you should really get yourself a reputable theory book or enroll in a class, I think you would find it very interesting & usefull.
Good luck, and keep asking questions, that's how you learn!!