HCl + NaOH: Why H prefers to move to O instead of staying with Cl?
Because hydroxide is a stronger base than chloride. Chloride is a much larger ion, and thus its negative charge is spread over more volume, stabilizing it. The negative charge on the oxygen in hydroxide is spread out over less volume, leaving it more reactive. Thus, when a $\ce{H^+}$ ion is available, it will preferentially be retained by the hydroxide rather than the chloride.