I am answering my own question because I discovered the answer in my notes, and it may help someone else (it will definitely help me as I return to reference this page in the future).
Here is what is meant by $\sigma$-finiteness being "hidden" in the hypotheses of Fubini's theorem.
To prove Fubini's theorem, we assumed $f \in L^{1}(d\lambda)$. Notice that $f = f\chi_{ \{ x \mid f(x) \neq 0 \} }$, where $\chi_{A} = \begin{cases} 1 & x \in A \\ 0 & x \not \in A \end{cases}$.
Then that means $\int \limits_{X} f \,d\lambda = \int \limits_{X} f\chi_{ \{ x \mid f(x) \neq 0 \} } \,d\lambda$. And $\int \limits_{X} f\chi_{ \{ x \mid f(x) \neq 0 \} } \,d\lambda = \int \limits_{X} f \,d(\chi_{ \{ x \mid f(x) \neq 0 \} } \,d\lambda)$ (for a proof, see the answer and comments here). The measure given by $\chi_{ \{ x \mid f(x) \neq 0 \} } \,d\lambda$ is $\sigma$-finite, because:
$X = \bigcup \limits_{n = 1}^{\infty} \{ x \mid |f| \geq \frac{1}{n} \} \bigcup \{ x \mid f = 0 \}$.
Now we just need to show each of these sets in the countable union has finite measure with respect to the measure $\chi_{ \{ x \mid f(x) \neq 0 \} } \,d\lambda$.
For each $n$, we have $\chi_{ \{ x \mid f(x) \neq 0 \} } \,d\lambda( \{ x \mid |f| \geq \frac{1}{n} \}) = \int \limits_{ \{ x \mid |f| \geq \frac{1}{n} \} } 1 \chi_{ \{ x \mid f(x) \neq 0 \} } \,d\lambda = \int \limits_{ X \times Y } \chi_{\{ x \mid |f| \geq \frac{1}{n} \}} \chi_{ \{ x \mid f(x) \neq 0 \} } \,d\lambda = \int \limits_{ X \times Y } \chi_{\{ x \mid |f| \geq \frac{1}{n} \} \cap \{ x \mid f(x) \neq 0 \} } \,d\lambda = \int \limits_{ X \times Y } \chi_{\{ x \mid |f| \geq \frac{1}{n} \} } \,d\lambda \leq \int \limits_{ X \times Y } n |f| \,d\lambda < \infty $
since $f \in L^{1}(d\lambda)$. So for each $n$, $ \{ x \mid |f| \geq \frac{1}{n} \} $ has finite measure with respect to the measure $\chi_{ \{ x \mid f(x) \neq 0 \} } \,d\lambda$. Also, it's clear that $\{ x \mid f(x) = 0 \}$ has measure $0$ with respect to this measure.
So, $(X, \Sigma, \chi_{ \{ x \mid f(x) \neq 0 \} } \,d\lambda)$ is $\sigma$-finite.
The assertion of Fubini's theorem for any integrable function what has been made in the book An Introduction to Measure and Integration by Inder K Rana is not correct. It should be the following $:$
Theorem (Fubini) $:$ Let $(X, \mathcal A, \mu)$ and $(Y,\mathcal B, \nu)$ be two complete $\sigma$-finite measure spaces. Let $(X \times Y,\mathcal A \otimes \mathcal B,\mu \times \nu)$ be the product measure space induced by $(X,\mathcal A, \mu)$ and $(Y,\mathcal B, \nu).$ Let $f \in L_1(\mu \times \nu).$ Then there exist $g \in L_1(\mu)$ and $h \in L_1(\nu)$ such that $$\int_{X \times Y} f\ d(\mu \times \nu) = \int_X g\ d\mu = \int_Y h\ d\nu.$$
Let us begin the proof from the last equality what I obtained i.e. \begin{align*} \int_{X \times Y} f(x,y)\ d(\mu \times \nu) (x,y) & = \int_X \left ( \int_{Y} f^+(x,y)\ d{\nu(y)} \right ) d{\mu}(x) - \int_X \left ( \int_{Y} f^-(x,y)\ d{\nu(y)} \right ) d{\mu}(x)\ \ \ \ {\label \equation (1)}\end{align*}
Let \begin{align*} E : & = \left \{x \in X\ \bigg |\ \int_Y f^+(x,y)\ d\nu(y) < +\infty \right \} \\ F : & = \left \{x \in X\ \bigg |\ \int_Y f^-(x,y)\ d\nu(y) < +\infty \right \} \end{align*} Since the maps $x \longmapsto \displaystyle {\int_Y} f^+(x,y)\ d\nu(y)$ and $x \longmapsto \displaystyle {\int_Y} f^-(x,y)\ d\nu(y)$ are both $\mu$-integrable it follows that $\mu (E^c) = \mu(F^c) = 0.$ Define a function $g^+ : X \longrightarrow \Bbb R$ defined by $$g^+(x) = \left ( \displaystyle {\int_Y} f^+(x,y)\ d\nu(y) \right ) \chi_E (x),\ x \in X$$ and a function $g^- : X \longrightarrow \Bbb R$ defined by $$g^-(x) = \left ( \displaystyle {\int_Y} f^-(x,y)\ d\nu(y) \right ) \chi_F (x),\ x \in X$$ Then clearly $g^+(x),g^-(x) < +\infty,\ $ for all $x \in X.$ Moreover \begin{align*} g^+(x) & = \displaystyle {\int_Y} f^+(x,y)\ d\nu(y) ,\ \text{for a.e.}\ x(\mu) \\ g^-(x) & = \displaystyle {\int_Y} f^-(x,y)\ d\nu(y) ,\ \text{for a.e.}\ x(\mu) \end{align*} Let $g : = g^+ - g^-.$ Since the maps $x \longmapsto \displaystyle {\int_Y} f^+(x,y)\ d\nu(y)$ and $x \longmapsto \displaystyle {\int_Y} f^-(x,y)\ d\nu(y)$ are both $\mu$-integrable and $(X,\mathcal A,\mu)$ is a complete measure space it follows that $g^+,g^-,g \in L_1(\mu)$ and we have the following equality \begin{align*} \int_X g^+\ d\mu & = \int_X \left (\int_Y f^+(x,y)\ d\nu(y) \right ) d\mu(x) \\ \int_X g^-\ d\mu & = \int_X \left (\int_Y f^-(x,y)\ d\nu(y) \right ) d\mu(x) \\ \int_X g\ d\mu & = \int_X g^+\ d\mu - \int_X g^-\ d\mu \end{align*} From the above three equalities it follows that $$\int_X \left (\int_Y f^+(x,y)\ d\nu(y) \right ) d\mu(x) - \int_X \left (\int_Y f^-(x,y)\ d\nu(y) \right ) d\mu(x) = \int_X g\ d\mu.$$
Now from $(1)$ it follows that $$\int_{X \times Y} f\ d(\mu \times \nu) = \int_X g\ d\mu.$$
Similarly by observing that \begin{align*} \int_{X \times Y} f(x,y)\ d(\mu \times \nu) (x,y) & = \int_Y \left ( \int_{X} f^+(x,y)\ d{\mu(x)} \right ) d{\nu}(y) - \int_Y \left ( \int_{X} f^-(x,y)\ d{\mu(x)} \right ) d{\nu}(y) \end{align*} and by exploiting the completeness of the measure space $(Y,\mathcal B,\nu)$ we can find out $h \in L_1(\nu)$ such that $$\int_{X \times Y} f\ d(\mu \times \nu) = \int_Y h\ d\nu.$$
This completes the proof.
QED
Best Answer
Since you have too many things called $D$, let's let $\Delta = \{(x,x) : x \in [0,1]\}$ denote the diagonal. Then $E = \Delta^C$ is your counterexample.
We have $E_x = [0,1] \setminus \{x\}$ whose counting measure is infinite. So $f \equiv \infty$, which is measurable because constant, and $\int_X f\,d\lambda = \int \infty \,d\lambda = \infty$. Likewise, $E^y = [0,1] \setminus \{y\}$ whose Lebesgue measure is 1. So $g \equiv 1$, which is again measurable because constant, and $\int_Y g\,dc = \int 1\,dc = \infty$.
So the theorem holds for $E$. But it clearly does not hold for $E^C = \Delta$.