Is this an exception to the rule that strong acids/bases always replace weak acids/bases?

According to the $\mathrm{p}K\_\mathrm{a}$ table: hydrochloric acid is stronger than sulphuric acid. It has a $\mathrm{p}K\_\mathrm{a}$ around $-6.3$ while the $\mathrm{p}K\_\mathrm{a}$ of sulfuric acid is around $-3$. The second dissociation in the case of sulfuric acid is not very extensive and doesn't contribute much to its acidity.


\begin{aligned}
\ce{H2SO4 + H2O ~&<=>~ H3O+ + HSO4^{−}&&pK\_{a}~=~-3}\\
\ce{HSO4- + H2O ~&<=>~ H3O+ + SO4^{−2}&&pK\_{a}~=~2}\\
\ce{HCl + H2O ~&<=>~ H3O^+ + Cl^{-}&&pK\_{a}~=~$-6.3$}\\
\end{aligned}


Now $\ce{BaSO4}$ reacts with $\ce{HCl}$ to produce very less of $\ce{BaCl2}$ because of the insolubility of $\ce{BaSO4}$.


My teacher told me that in a reaction "Strong acids or bases replace weak acids or bases". This holds good for this reaction as $\ce{HCl}$ is stronger than $\ce{H2SO4}$.


However $\ce{NaCl}$ reacts with $\ce{H2SO4}$ to produce $\ce{Na2SO4}$ and $\ce{HCl}$. In this case $\ce{H2SO4}$ replaced a stronger acid $\ce{HCl}$. How do we account for this? 




Every reaction is considered reversible to some extent and feasibility of a reaction is mainly dealt in the terms of *favourability* of either products or reactants. When we say that creating a weaker acid from a stronger base is feasible, we actually mean that the equilibrium favours the formation of the products in such a case. However some other factors can be at play and can well influence an equilibrium. One such governing principle is *Le Chatalier's*.


$$ \ce{H2SO4 + 2NaCl <=> 2HCl + Na2SO4 }$$


Here's a [youtube video](https://www.youtube.com/watch?v=e_kZe73QC5o) showing the production of hydrochloric acid under laboratory conditions. Notice the $\ce{HCl}$ produced is a gaseous product, and hence there's an imbalance in our equilibrium; $\ce{HCl}$ escapes out as vapors from the solution, lowering $Q\_c$ of the reaction thus making the reaction go forward.


 1