All competition is wasted effort. Perfect collaboration always wins. But competition is what motivates humans, and unfortunately this inefficient way of working is what drives humanity forward.
China would not even bother with half the stuff they accomplished for space if it were not the existence of a competitive goal. The irony is what the US tried to do to contain them in actuality enabled them.