In[2]:= FullForm[(a - b)^2]
Out[2]= Power[Plus[a, Times[-1, b]], 2]
so the square operation is distributed over a and -b inside Plus.
For the desired result, try
In[4]:= Distribute[Unevaluated[(a - b) (a - b)]]
Out[4]= a^2 - 2 a b + b^2
see also 'Possible Issues' in the documentation of Distribute.