NASCAR is not meant to be logical, it's meant to be an exciting spectacle. Just look at the "lucky dog" rule: it allows the first of the lapped drivers to be put in the main lap during a yellow. The goal is to create a race within the race for this spot.
In effect, you can win a race while having traveled 1 or 2 laps less than the others if you benefited from the lucky dog rule once or twice.