You've overlooking the political realities, though.
Without those pork barrel projects, it's not clear that NASA would have received even the funding that it got, as politicians weren't all that interested in diverting federal dollars away from their closer-to-home projects.