The way the complicated orbital mechanics work, there is a "gate" which is the only place where asteroids/comets/whatever can cross Jupiter's orbit. This doesn't usually result in them hitting Jupiter, but it does limit their options for hitting Earth.
Been a while since I watched the video, so I don't remember all the details, but that should be the basic gist.
Jupiter’s gravity is thought to sling most of these fast-moving ice balls out of the solar system before they can get close to Earth... Without Jupiter nearby, long-period comets would collide with our planet much more frequently.
Consider that its powerful gravity prevented space rocks orbiting near it from coalescing into a planet, and that’s why our solar system today has an asteroid belt, consisting of hundreds of thousands of small flying chunks of debris. Today, Jupiter’s gravity continues to affect the asteroids – only now it nudges some asteroids toward the sun, where they have the possibility of colliding with Earth.
Editorial: It's a double-edged sword that favors us far more often than it doesn't. The human problem is that it only takes one collision to end us.
Dinosaurs were ended with a roughly 10-15km meteroirite hitting earth, and causing months of distortions and damage to the ecosystem that disrupted their way of life enough that they starved or died of other causes.
They were not nearly as adaptable as we are in modern times.
To be sure, a lot of progress would die, and life would be greatly disrupted, but we, as a species, would almost certainly survive a similar event.
I mean it's a mathematical inevitability that earth will get hit eventually. Having Jupiter there just gave us better odds. Luck doesn't last forever though.
It's not really about "attracting" asteroids, it's more about their orbital trajectory happening to intersect the Earth's at the right time. I think the Moon's gravity is about as likely to redirect an asteroid towards the Earth as it is away, but the Moon also physically intercepts some asteroids, so the net effect would be a slight decrease in Earthly asteroid impacts.