I think most people think of NASA funding like this:
I have to pay X amount in taxes every year regardless, so I would rather have that go to NASA than some other stupid program.
You have to give credit where credit is due. For the budget that NASA has (a few billions dollars) it gets A LOT done. I'm an aero/mech engineer, and I can tell you that NASA, unlike most government agencies, DOES attract incredible, productive talent and the results they usually produce in their research labs are incredible.
Take what NASA does with their 18 billion, and compare it to what any other agency does (even though they are usually funded in the 100's of billions) and you can get an idea for why NASA kicks ass.
I think it comes down to this. For most agencies, the employees work there because they need a job. Most of them aren't self motivated. Who says , "when I grow up I want to be a bureaucrat in a clean water committee fro the department of the interior." Answer: No one.
On the other hand, and I know a few of them, pretty much all of the researchers, scientists, and engineers at NASA are all top notch and very self motivated. They are working in their dream jobs, combining science and technology on an day to day basis. This is why I think NASA accomplishes so much, and with so little. Because of its people.
Again, I dont think most people would donate to NASA if given the chance. However, I think most people assume the money they pay in taxes is fixed every year, and in light of that, they would like to see as much as possible go to NASA, because they support that program more than the others in the federal government.