There are a few reasons for space agencies apart from defense dept. subsidies/utility.
If a means to make cost-effective in situ rocket fuel is found, the cost of metals on Earth will go down and/or the supply will blast off. One shopping mall-sized iron asteroid would have more metals than has ever been mined. Also, Aliens represent a very double-edged encounter event. It might not be wise to plateau technologies anytime soon and attempt a steady-state society as our improving humanist society has been technically fragile since WWII.
The R+D spinoffs of planetary satellite Missions are nice. Some materials science and electronics innovations scale up to one day be a part of the general economy. Planetary Missions are getting cheap all the time but the science returns may encounter diminishing returns.
My preference is the search for active animal ecosystems at infinitesimal odds. The portion of NASA's $2B/yr (the rest of the world might have the same budget) planetary science budget devoted to the search for animal life is small; where the search is for life it has been for microbes and past life. The main reason for this is a heat source has been under-estimated until this past decade. Low grade heat sources include exothermic chemical reactions, the Sun, and radioactive decay. It turns out tidal heating, the motion of Ice Moons around at least Saturn and Jupiter, is enough to melt ice. There are a half-dozen or so Moons where this is expected to be true based on measures of wobbles and/or ions (salt water).
Teeny Enceladus appears to have active geysers. Cassini has been through the plumes but was not designed for anything but a rudimentary search for life molecules. Europa is currently the favoured of the Ice Moons. Not sure why; it takes about 6 years for ion engines to get to Jupiter and 9 years to get to Saturn. Four Ice Moons on Jupiter may comprise a better science payoff than Saturn's Titan and Enceladus. The other Jovian Ice Moons with potential liquid water have a crust above the water layer in addition to ice; there is only one Solar System body where it seems a tunnel through the Earth will be burned.