...
Sure, Opportunity Cost 101....
I agree that in many cases government research may be a waste of time. If people are allocated a budget, they better use it or they'll lose it!

However, my point gains the most significance in cases where there are clear moral values at stake, yet its worth is not measurable in money. E.g.: cancer cures, search-and-rescue/disaster relief tools, plentiful sources of potable water.... Even loss-making space exploration has value.
Health will be redefined to mean something else, education will be redefined to mean something else, family will be redefined to mean something else... all in pursuit of tricking people to maintain funding. You won't see a cancer cure in the near future because the majority of the research focuses on one target, then trying to compensate for everything else that fucks up in the system, etc. This is what occurs when linear thinking is used to assess systems with multiple feedbacks. Once people start really trying to model these tissues as systems they will then have to waste a bunch of time on getting rid of all the false interactions from their models and basically do the whole thing over again from scratch anyway. Best treatment for cancer is what it has been for 50 years: detect early, cut it out, then, if necessary, poison the person to near death in the hope the cancer dies first.
What I meant with the cancer cures is that in a free market system that ignores any losses incurred by society as an unwitting third party, the path of least resistance is to milk the patient as they slowly die. Hence -- no major breakthroughs in the past 50 years.
Edit: could you elaborate on what you meant by redefining health/education/family? (It's getting a bit late here. Brain = slow.)