Let's consider the first integral,
$$\int_0^1 \left( \int_0^1 f(x,y) dy\right) dx. \tag{1}$$
The inner integral is
$$ \int_0^1 f(x,y) dy.$$
If $x$ is a rational number, then this is
$$ \int_0^1 1 dy = 1.$$
If $x$ is irrational, then this integral is
$$ \int_0^1 2y dy = y^2 \bigg|_0^1 = 1.$$
So the inner integral is always $1$. Thus we can rewrite $(1)$ as
$$ \int_0^1 1 dx = 1.$$
Let us now consider the second integral,
$$ \int_0^1 \left( \int_0^1 f(x,y) dx \right) dy. \tag{2}$$
We must consider the inner integral again. The inner integral is
$$ \int_0^1 f(x,y) dx.$$
If $y$ is any number other than $\frac{1}{2}$, then this integral is not integrable. In short, as the rationals and irrationals are each dense in $[0,1]$, any upper sum partition of $[0,1]$ will yield a very different area estimate compared to any lower sum partition of $[0,1]$.
This function is essentially the Dirichlet Function, and it is a classical exercise to show that the Dirichlet Function is not integrable [See this answer on this site to a similar question for one explanation as to why $(2)$ is not integrable].
Since the inner integral in $(2)$ is not integrable, we have that this integral fails to exist.