Congress determines what taxes are to be used for. They are in control of the purse.But Congress does allocate money for the sciences and its within the law.
But at this current moment there is no money for NASA so we have to depend on other sources or spread the costs around to other agencies. Cost is what killed the Space Shuttle and fleet was getting old despite of upgrades.The total cost of the actual 30-year service life of the shuttle program through 2011, adjusted for inflation, was $196 billion.The exact breakdown into non-recurring and recurring costs is not available, but, according to NASA, the average cost to launch a Space Shuttle as of 2011 was about $450 million per mission.