Answer:
It's an investment into the future. Some options include:
- finding expensive or Earth-scarce materials in space
- starting a colony on Mars in case we destroy Earth even further
- get telescopes or space probes into space so that we can get better images of space and thus help physics better understand things like gravity or find life outside Earth
Step-by-step explanation:
There are potential benefits to going to space. The problem is it's very expensive and unlikely to "pay off", even in terms of what is normally considered a long term investment.
NASA is spending so much money to go to space because, even though the costs are enormous, there are some potential gains which, if possible, are invaluable, even though there is no "classic" way to make money off it.
This makes government, as an entity tasked with weighing the public spending between current needs and investments, responsible for deciding if there is merit in such a huge and generations-long investment. US government decided yes and so funds NASA.