A very similar argument can be made for particle physics and their colliders. Yes, telescopes produce pretty pictures, but fundamental particle physics occasionally produces practical results.
Well, they used to (the colliders I mean). Modern particle physics seems to be more in the confirmation stage of current theory rather than a discovery phase like it used to be maybe 40 years ago.
Meanwhile astronomy keeps opening up new questions about the universe that require even better equipment to attempt to answer.
Building better colliders and better telescopes are interesting end goals, but also consider what goes along with them.
Building them means funding multiple generations of new theorists and engineers. A lot of those people do fundamental research and then branch out to both found new commercial companies based on those discoveries and to work for those companies.
I think it's better to look at "big science" in a much broader perspective. The new collider or telescope might "cost" $10 billion, but that isn't the cost of building the machine and its materials.
Most of that money goes into paying people across a very diverse field of professions to do the research and engineering required to make that big pretty picture machine work. That's the stuff that drives technical innovations at the edge of what we apes currently understand.
When we fall back to asking why build pyramids, cathedrals, highways, rockets, or anything else that requires a vast number of people to work towards the same goal, don't forget about what everyone gets from the journey on the way.