It mostly has to do with three factors, numbers, fecundity, and behavior. Let's start with the last, certain behaviors that increase your chances of surviving are far more likely in smaller animals things like burrowing, and hibernation. They are also more likely to be generalists able to eat almost anything, specialization is a death sentence during a major environmental change. They also require less total amounts of food as individuals, it is far easier for a rat to find enough food to survive in a wasteland than an elephant, This is also true in comparing cold-blooded vs warm-blooded animals.
Second you have numbers, there are several billion rats in NYC alone, even with the total destruction of the city it is very easy for a some rats to happen to be lucky enough to survive, small animals will die in larger numbers but there are so many of them they are more likely to have some survive. They literally have the law of large numbers in their favor.
Last is reproduction, size is connected to reproduction, an elephant reproduces once every two years under ideal conditions, while a rat can breed every 24 days, so even if a few elephants do survive they repopulate so slowly they may never recover and some other minor event may finish them off.
So if you combine these not only are small animals more likely to survive they can recover far faster than most large animals, so all things being equal you should expect small animals to be better at surviving and diversifying after a event.