You can take a more birds-eye view of the question.
Recall that the main purpose of the NSF is to support part of the public policy interests of the U.S. government. Here is a quote from "NSF at a glance":
NSF's goals--discovery, learning, research infrastructure and stewardship--provide an integrated strategy to advance the frontiers of knowledge, cultivate a world-class, broadly inclusive science and engineering workforce and expand the scientific literacy of all citizens, build the nation's research capability through investments in advanced instrumentation and facilities, and support excellence in science and engineering research and education through a capable and responsive organization.
As the NSF says on the same page,
We fulfill our mission chiefly by issuing limited-term grants -- currently about 11,000 new awards per year, with an average duration of three years -- to fund specific research proposals that have been judged the most promising by a rigorous and objective merit-review system.
It is true that indirect costs on a grant don't directly support costs of research - that's why they're "indirect costs". But they do support the national research infrastructure by passing additional funding to institutions that show merit by winning competitive grant funding. The indirect funding helps these institutions provide a research environment not only to the researchers who are awarded grants, but also to other researchers and students.
Supporting the overall national research infrastructure is certainly a reasonable part of the public policy goals of the NSF, and the indirect costs system is not the worst way I can think of to decide which institutions will receive such funding. Of course, there are also equipment grants and other specialized NSF grants, which also help support the national research capacity.