Edit: I should say that my professors came off more as defeatist than dismissive. I was never told that I couldn't study Philosophy at the graduate level.
These people are disillusioned and so will the future you be, but your present you has to make the decision. It's incredibly valuable that they're being honest to you and to themselves.
So I double majored in computer science and philosophy like a lot of my class mates.
I think to a great extent this is due to the logical-positivism and Russellian analytic focus that took over the profession after WWII. Before that American philosophers focused on classical philosophy, Hegelianism, and Pragmatism, all of which could be related to the realities of contemporary life and society.
But then, as Rorty has explained, philosophers got the idea of turning their field into an exact science that would be the handmaiden of the natural and social sciences. This made philosophy inaccessible to non-specialists, and furthermore was a gigantic intellectual failure. One result was the profession came to be populated by several generations of teachers who have no idea about how to talk to non-philosophers. Hence you get people like Steven Hawking and Neil Degrasse Tyson arguing that philosophy is irrelevant. And the only other group is the postmodernists, who tend to be marxists who turn off most Americans.
All this is quite unfortunate, in part because liberal democracy is based to a great extent on philosophical ideas that go back to the Greeks, and hence philosophy has a great deal to say that is relevant today.