NASA chose to give 2/3rds of the funding to ULA, and seemed pretty reluctant to include SpaceX - it seemed like they were forced to at the time.
They mismanaged the space shuttle, racking up huge costs on a vehicle that put people's lives at risk, while lying to congress and everyone else about how reliable it was. Feynman's report is a good read. Here's an HN thread.