The velocity (both speed and direction) of an object like an asteroid is very frame dependent. So you seem to envision the frame of the sun say, where the asteroid is on a path not towards Earth, but one that will cross Earth's orbit exactly when Earth gets there. You hit it straight on in a direction opposite its motion in that frame. It slows, and the mostly unaltered paths still cross, but the objects are at that point in a different times.
Now do that from Earth frame (the frame from which the rocket was launched). In that frame, Earth is stationary and the the asteroid is heading straight for us. If we hit it straight on in that frame, it will slow, but still get here a little bit later. Point is, a straight bullet shot fired from Earth isn't going to divert it. In that frame, to get it to miss, you need to apply lateral momentum to it. This involves sending the rocket on a curved path, wasting fuel compared to the straight path. And only the fuel expended for the lateral motion will effect the asteroid in a deflecting way. So you need a lot of fuel. One batch to get there (all unusable for deflection) and a whole separate batch to apply laterally to the thing.
All this kind of presumes flat inertial motion of both Earth and asteroid, which is accurate if the thing is pretty close, but the idea is to get it when it isn't so close since it takes less effort to divert something far away. A smaller deflection is needed to effect a miss. So maybe our computers predict this collision on some prior orbit and we can manage to hit the thing slightly on some prior pass. Idea is to not hit it when it crosses Earth orbit since no defection there will prevent it from returning to Earth orbit repeatedly.