And that's a fine enough reason. Sometimes learning assembly leads people to learn about electrical engineering concepts, and boolean algebra. Sometimes writing algorithms that need to be efficient leads people to learn about number theory. Sometimes people trying to develop a really effective database schema get interested in set theory.
These are good things.