Should I take undergraduate CS classes if all I do is applied software dev and data science?
If you are considering such classes, then go for it!

You are right that basics of computer science have little to do with direct application (its unlikely that you will need to invent a new sorting algorithm). But:


algorithmic thinking is invaluable,
getting it at level of computer science students (rather than "computer science for liberal arts majors") may be a challenge worth it,
getting contacts and interaction with CS students is invaluable (you may learn a lot about applied programming by immersion),
learning advances CS will pay off (regardless if you stay in academia or not).


Dedicating a year or whole studies to something is a commitment people sometimes regret. Taking a one or two courses someone is interested it is rarely regretted.

@EnergyNumbers warns you against lack of focus. But hey, you are not taking a random subject! It is a thing that will boost skills you need for the things you are doing.

Source: I did take one such class (while majoring in phys/math) and it was great (my only regret is I didn't take more). Now I am doing data science.

Disclaimer: I do like to side-track and I have little respect towards entrenching oneself in one, arbitrarily defined field.