Excellent thermoelectric performance in the out-of-layer n-doped SnSe has been observed experimentally (Chang et al., Science 360, 778-783 (2018)). However, a first-principles investigation of the dominant scattering mechanisms governing all thermoelectric transport properties is lacking. In the present work, by applying extensive first-principles calculations of electron-phonon coupling associated with the calculation of the scattering by ionized impurities, we investigate the reasons behind the superior figure of merit as well as the enhancement of zT above 600 K in n-doped out-of-layer SnSe, as compared to p-doped SnSe with similar carrier densities. For the n-doped case, the relaxation time is dominated by ionized impurity scattering and increases with temperature, a feature that maintains the power factor at high values at higher temperatures and simultaneously causes the carrier thermal conductivity at zero electric current (k_el) to decrease faster for higher temperatures, leading to an ultrahigh-zT = 3.1 at 807 K. We rationalize the roles played by k_el and k^0 (the thermal conductivity due to carrier transport under isoelectrochemical conditions) in the determination of zT. Our results show the ratio between k^0 and the lattice thermal conductivity indeed corresponds to the upper limit for zT, whereas the difference between calculated zT and the upper limit is proportional to k_el.