Why we have to multiply the images with $(-1)^{x+y}$ to center the transform in frequency domain filtering?
Below 1D argumentation also explains the 2D case.

First consider the DTFT property for the pair $x[n] \longleftrightarrow X(e^{j\omega})$

$$ e^{j\omega_0 n} \cdot x[n] \longleftrightarrow X(e^{j(\omega - \omega_0)}) $$

Then recognise that $(-1)^n = e^{j \pi n} $ which yields:

$$ e^{j\pi n} \cdot x[n] \longleftrightarrow X(e^{j(\omega - \pi)}) $$

The effect is such that the spectrum $X(e^{j \omega})$ is centralized (shifted) into the $\omega = \pi$ frequency.

In 2D, the DTFT of the image is shifted into the central zone.