The thermal decomposition of NH4Cl
In the solid state of ammonium chloride, the nitrogen and hydrogen atoms are connected by covalent bonds, forming the ammonium ion. The bond length is about 98 pm. Each ammonium ion is surrounded by eight chloride ions (and in turn, each chloride ion is surrounded by eight ammonium ions). The distance between a chloride and the closest hydrogen atoms is about 237 pm. In contrast, the bond length in HCl is 127 pm.



In the reaction $$\ce{NH4Cl(s) -&gt; NH3(g) + HCl(g)},$$

you lose the ionic interactions, and ammonium gets deprotonated while chloride gets protonated (lose an N-H bond and gain a H-Cl bond). The change in entropy for the reaction is positive, so it is favored at high temperature.

We might think that high temperature makes the H-Cl bond stronger and the N-H bond weaker. The bond dissociation energy for N-H is 390 kJ/mol while that of H-Cl is 432 kJ/mol. However, bond dissociation energies are not directly relevant because we are not transferring a hydrogen atom (making $\ce{NH3+ + HCl-}$). Instead, we are transferring a proton, so the pKa of ammonium and hydrogen chloride are more relevant but not directly either because this does not happen in aqueous solution.

The key is that the products are in the gas phase. If the products of the decomposition were ions and had opposite charges, they would not remain in the gas phase. In aqueous solution, you get $$\ce{NH4Cl(s) -&gt; NH4+(aq) + Cl-(aq)}$$ because water is good at solvating ions. In the gas phase, the most stable combination of the atoms at hand is $\ce{HCl + NH3}$.