This rule desperately needs to be changed. A defense can fail to do their job and allow a 99 yard drive. But the defensive team gets rewarded if the offense fumbles through the end zone?
How many fumbles do you see where the ball carrier just drops the ball without contact vs a defensive player punching the ball out?
And the defense isn't getting rewarded for anything. The offense screwed up, it's their fault they fumbled the ball and allowed it to roll out of bounds in the endzone.