Cross correlation with FFT and fftshift
The (linear or aperiodic) convolution of two vectors $\mathbf x = (x[0], x[1], \ldots, x[N-1])$ and $\mathbf y = (y[0], y[1], \ldots, y[N-1])$ is a vector $$\mathbf z = {\mathbf x}\star {\mathbf y} = (z[0], z[1], \ldots, z[2N-1]).$$
On the other hand, their cross-correlation is a vector
$$\mathbf w = {\mathbf x}\otimes {\mathbf y} = (w[-(N-1)], w[-(N-2)], \ldots,
w[-1], w[0], w[1], \ldots, w[N-2], w[N-1]).$$
Now, the FFT method for computing convolutions computes the cyclic (a.k.a. periodic
or circular) convolution of the two vectors.  To compute the linear or
aperiodic convolution via FFTs, you zero-pad the
vectors to length $2N-1$ so that the cyclic convolution of the zero-padded
vectors is exactly the linear convolution you are looking for.
Thus, after FFTing, term-by-term multiplying, and inverse-FFTing,
what you get is $\mathbf z$. This is exactly what you have done as per
your question. However, when you use the FFT method to compute the
cross-correlation, what you get is the cyclic cross-correlation of
the two zero-padded vectors, and this cyclic cross-correlation is not
$\mathbf w$ but instead
$$\hat{\mathbf w} = (w[0], w[1], \ldots, w[N-1], w[-(N-1)], w[-(N-2)], \ldots,
w[-2], w[-1])$$ so that to get the $\mathbf w$ that you want, you need
to circularly rotate $\hat{\mathbf w}$ so that $w[0]$ appear in the middle
of the vector.