I am working on my degree in mathematics, and want to pick the classes carefully in a way to maximize my computer science potential. If theirs very few applications of abstract algebra or number theory, it seems like it might be better to take a different course.
From the point of view of getting a mathematics degree, I don't get how the foundations of abstract algebra and number theory can be anything other than formally, or at least practically, required basic courses. We are talking about general theory, not about making these fields your specialty.
If you are interested in applying math to computer science, learning a little bit of everything without blind spots is the best way to improve your chances of knowing something relevant to your practical problems.