# Why does nucleophilic substitution of a haloalkane with ammonia produce ammonium, not a hydrogen halide?

For example, $\ce{CH3CHBrCH3}$ reacts with $\ce{:NH_3}$ to make $\ce{CH3CH(NH3^+)CH3 +:Br-}$,$$\ce{CH3CHBrCH3 \rightarrow CH3CH(NH3^+)CH3 +:Br-}$$then reacting again with $\ce{:NH_3}$ to make $\ce{CH3CH(NH2)CH3 +:Br^- +NH4^+}$:

$$\ce{NH_3 + CH3CH(NH3^+)CH3 +:Br- \rightarrow CH3CH(NH2)CH3 +:Br^- +NH4^+}$$

Question: why does the last step not produce $\ce{CH3CH(NH2)CH3 +HBr}$? That is, why is Ammonia a better nucleophile than the halide ion, despite having a lower partial negative charge (the halide has a $-1$ charge)?

Edit: a suggestion made by a teacher is that my proposed step does in fact happen, it's just that it occurs as an intermediary to the last step. Apparently, it's very favourable to have a Hydrogen Halide and Ammonia acid-base reaction. Is he correct, and if so, why is this?

$$\ce{CH3CH(NH3^+)CH3 +Br- \rightarrow CH3CH(NH2)CH3 +HBr}$$
Here, you have a weak acid $\ce{(CH3CH(NH3^+)CH3)}$ and a very weak base $\ce{(Br^{-})}$ reacting with each other to turn into a weak base $\ce{(CH3CH(NH2)CH3)}$ and a very strong acid $\ce{(HBr^)}$. This is highly unfavourable from a thermodynamic sense, because you're trying to inject a lot of chemical potential into the molecules at no cost. Though your teacher suggests it might happen, I wouldn't be very comfortable saying that, if only for the fact that there's another, easy option.
It is possible that the previous argument is slightly circular, so it's best to explain why $\ce{HBr}$ is such a strong acid / $\ce{Br^-}$ is such a weak base. As you mention, $\ce{Br^-}$ has a negative charge, and one might expect that to mean it is a better base. However, that affirmation is only useful as a rule of thumb when comparing substances of different structure, being strictly valid solely when looking at a single sequences of related structures (such as $\ce{PO_4^{3-}}$/$\ce{HPO_4^{2-}}$/$\ce{H_2PO_4^{-}}$). The strength of a base is determined by several factors, such as charge localization, bond strength between base and a proton, steric hindrance, and strength of interaction of the protonated/deprotonated species with the solvent (if it exists). There are very strong neutral bases and very weak negatively charged bases ($\ce{SbF_6^-}$) known.
$\ce{Br^-}$ is a poor base because, while it has a net negative charge, that extra electron is bound to a somewhat electronegative atom, thereby stabilizing the charge. Not only that, but the bromide anion is quite large, so the charge is "spread out" over a significant volume and would attract a proton less, in some sense. Meanwhile, though $\ce{NH_3}$ has no extra charge, and even though the central nitrogen atom is more electronegative than bromine, the non-bonding pair of valence electrons in $\ce{NH_3}$ is highly localized, especially due to the fact that second period p-block elements are anomalously small. This makes $\ce{NH_3}$ an attractive target for a proton.