Logicians are somewhat different in studying formal systems, and there are strong links to (foundations of) mathematics. But logics are typically developed and analyze to study some otherwise philosophically motivated questions.
And they probably know other people in the department who teach things that might be interesting to a STEM student even if that student hardly knows it yet.
Few generalisations hold of philosophy departments across traditions and regions, and this is untrue of departments in the analytic tradition of which Dennett was part. Philosophical logicians are often interested in more than logic for logic’s sake, and other philosophers share that interest; see e.g. Williamson’s /Modal logic as metaphysics/.