I wonder if this attitude was a thing when CS was first introduced as a major. At the time it must have looked like someone basically took a tiny part of electrical engineering and made it into it's own field of study.
Historically, it was as likely to be part of the math department as it was to be part of electrical engineering. In part, this was because at the time electrical engineering was much more about analog circuits, power systems, etc.
in germany, you can still see the impact on whether CS emerged out of math or EE in the curriculums. When you have a lot of low-level programming, operating-systems, designing hardware etc. the departement was born in EE. If the emphasis is more on math, they teach you an abstract view on "computers" (the turing machine/lambda calculus as the foundation of computing) and view processors as just an application, it came from the math-departement. It's probably the same in the rest of the world.
Historically, it was as likely to be part of the math department as it was to be part of electrical engineering. In part, this was because at the time electrical engineering was much more about analog circuits, power systems, etc.