Right so the offense fumbles the ball, they've lost possession of it, they have to recover it to keep it, if the defense recovers it it's theirs. So at that point the ball is on the ground and there's two teams equally scrambling to get the ball. But with the sideline rule despite the fact that neither team has gained possession of the ball it gives the ball to one of them, so one of them gets rewarded despite not actually doing anything. For all of the field except the endzones it gives the ball to the offense, but in those two areas it gives it to the defense.