Most science fiction says it happens this way:
After the asteroid impact... Humanity pulled itself from the breach of collapse and rebuilt. Once they could regain a foothold on space, they made it a priority to put in place the necessary resources to make sure it would never happen again.
OK, so, while it is fiction, sometimes literature provides insight into the human psyche. Frankly, I doubt you'll be able to convince the world governments to put any real money into an asteroid defense venture... that is until an impact happens and does sufficient damage to wake up all the people in power up. Most think that it will never happen. Most also believe they have more important issues to deal with in their local district and can't concern themselves with global issues.
Arithmetic is being able to count up to twenty without taking off your shoes. -- Mickey Mouse