When your country gets taken over by another one because you had nothing to defend yourself with, that space program you're so proud of is going to look pretty useless.
I think it is a stretch to describe the primary purpose of NASA as "for the betterment of mankind." Teflon, Tang and velcro are all nice inventions, but hardly worth the budget that NASA has had to invent them if as you claim, NASA's purpose is to better mankind. NASA, itself, has done very little beyond generating jingoistic pride when it comes to having any sort of significant impact on human lives.
NASA has done some very interesting and amazing things, and there is absolutely a place for it in our national budget, but don't kid yourself about bettering mankind. It's not doing that. At least it hasn't yet.