Why resampling outperforms reweighting for correcting sampling bias