When people think of science or engineering, they think of people solving real world problems, making advancements in society through technology or other means, fixing infrastructure, and more.
Truth is most mathematicians, mainly the pure math kind rarely or almost never care about that stuff. They just want to do math for fun.
As you have seen, majority of people couldn't care less and so math is not remembered.
Do scientists and engineers use math? Yup. Difference is that the math they're doing (in society's eyes) is actually contributing meaningful outcomes or having an impact.
So, universities reflect that. Think, the people bringing in big grant money?
Engineers and scientists
The people giving a university media attention and funding?
Engineers and scientists
Unless you have mathematicians on the calibre + fame of say Terrace Tao or who are field medalist, society couldn't care less for your average mathematician.