Consider counting measure $\mu_1$ and $\mu_2$ on $X=Y=\mathbb{N}$
Define a function, $$ f(x,y) = 2-2^{-x} \ \text{if} \ \ x=y \\ \text{and}\\ f(x,y) = -2 + 2^{-x} \ \text{if} \ \ x=y+1 $$ I showed that $$ \int_X(\int_Y f(x,y)d\mu_2)d\mu_1 =1 $$ and $$ \int_Y(\int_X f(x,y)d\mu_1)d\mu_2 =-\frac{1}{2} $$ Therefore two iterated integral does not equal. But I can to show that why Fubini's theorem does not contradict.
Thanks in advance
$\int |f(x,y)| d\mu_1(y) d\mu_2(x) \geq \int |2-2^{x}| d\mu_1(x)=\sum_x |2-2^{x}| =\infty$. Hence $f$ is not integrable on the product. Neither is it non-negative. So Fubini/Tonelli Theorem is not applicable.
[$ \sum |2-2^{x}| \geq \sum 2 -\sum 2^{-x} = \infty$ since $\sum 2^{-x} <\infty$].