A long time ago
A married couple worked hard and put their lives on the line to discover Radium, irradiation and how to detect it. The work of Pierre and Marie Curie ultimately led to X-ray machines, and founded the first stepping stone to what is nowadays nuclear power plants.
At the beginning of their research, not many people were interested. For years their "research" was done in an unused hangar, with a bare minimum in material. But their discovery and the conclusions it yielded were hailed as a great achievement. No one could have guessed it when they started.
If the director of the university where Pierre and Marie Curie worked had decided to forbid their research (and supposing the couple abided by that decision), we just might be still using candlelight today, and nobody would have computers of any kind.
Space research is the same thing. It's long, it's expensive, and Joe Public sees no use for it. But that same Joe Public just might, one day, be able to set foot on other planets because of it. If that is just remotely possible, I say today's research is money well spent.