Yes and no. Depends on what your goals are. The more you learn the better and being able to visualise scale notes across the fretboard is definitely a good thing – not necessarily a necessity though. Personally I come into these things from another direction – I learn other things that are more useful at the time and just let my fretboard knowledge build on that – same result different route.
There are a thousand things I don’t know on the guitar because I don’t use them, or need to use them. But if I did I could learn them reasonably quickly because of what I do already know.
In other words, learn as much as you can but also have a reason to learn them, if not then spend that time on something more useful to you at this moment – eventually these things all tie up.