Why do we need NASA and space X at the same time

NASA's support for space X and other companies has reshaped the U.S. aerospace industry. Traditionally, deep-rooted aviation contractors with little or no competition now pay more attention to new technologies that can reduce Aerospace costs. American companies are now competing for the global launch market, which used to be the domain of Chinese and Russian rockets. NASA also benefits from having multiple domestic and international partners to launch spacecraft and deliver crew and cargo to the international space station.
Space X has helped to revive public interest in space flight. The company's excellent use of live technology makes every rocket launch and landing an exciting thing. The interest in what space X does (usually with NASA) has inspired a new generation to pursue an exciting space career.

But humans still need NASA, which does much more than send astronauts into orbit. There is no business case for launching a spacecraft to Pluto or landing on Mars to look for signs of past life. Space exploration and scientific discovery need long-term public support and investment, and human beings may even have the moral obligation to explore the universe. NASA is also much larger, spending tens of billions of dollars a year on hundreds of major projects, while space X spends millions on just a few.
Space exploration shows the best of human beings. When government agencies like NASA and private companies like space X work together, both sides will benefit.