It's a dumb rule. A ball going out of bounds in the end zone on a fumble should be treated the same as a fumble going out of bounds on every other part of the field.
This would be the most consistent.
As someone said upwards in the thread though, that could just result in 'fumbles' forward the endzone, so you could just spot it at the 1yl or spot it at the spot of the fumble if it crosses into the endzone.
The idea that you should automatically hand it to the defense in that situation,however, is asinine.