I didn't figure this out with certainty, but if you take a look at the "More About" section of the documentation for xcorr, it mentions that xcorr can only approximate the true cross-correlation if an infinite-length signal, due to the finite length of the input vector. So, I think what is happening is that the end effects are overwhelming the "true" lag result.
I confirmed this by using
a = repmat(a,5,1);
b = repmat(b,5,1);
to get more extended signal, and you do see the lag=-1 dominate.