Undergrad is like high school, or even middle school. You learn all these subjects like chemistry and art history that you never use later. Were they useless?
No, they were still valuable. Your studies get more concentrated as you go higher up the education ladder, eg GRAD SCHOOL.
So in other words, hooray, my econ + math background is not going to waste if I pursue something totally different after graduation