Most basic research is not beneficial to civilizaton. We fund it knowing that a small fraction of it will prove to be immensely useful. (And of course, without being able to know which fraction that is in advance.)