That's an excellent point, one I think is often overlooked.
I cannot know how many discoveries were founded on the backs of some other line of research, but what I do know is that things are discovered during the course of research.
Imagine the kind of applications the research into a livable Mars might yield. Our own infrastructure, agriculture and more could stand to benefit quite a bit here at home from the cash we invest looking towards the Red planet.
Scientific discovery whether it fails or succeeds will never hurt us or set us back, it's failure to keep momentum going that will. Space tech hasn't really evolved like other industries in the past 40 years because interest has dried up. It's now starting to see a revival, and I for one am excited, and would like to take a space trip on the ITS around the solar system which may be a possibility.
If I can't go to mars, I'd still love a chance to go see the rings of Saturn from a space hotel. That would be worth every dollar, and crashed rocket.