While not everything learned in an undergraduate computer science program is practical in the sense that you'll use it all the time in the real world, there are a fair number of topics that while not necessary 99% of the time turn out to be the best solution that other 1% of the time. Finite state automata, for example, isn't something I'd bother to learn about but has proven helpful a handful of times.