How to evaluate the following integral: $$ \iint\limits_D\max\left\{\sin x,\sin y\right\}dxdy,\ \ \text{where}\ D=\left\{0\le x\le\pi,\ 0\le y\le\pi\right\} $$
To be honest, I don't understand how to approach this problem. In my opinion, $\sin y$ is always greater than $\sin x$, since $x=\sin y$ lies higher than $y=\sin x$ for any given point. But it doesn't seem to be true. Could anyone give me a hint about how I should evaluate this integral?

Denote $$f(x,y) = \max \{\sin x, \sin y\}.$$ $f$ being the max of two continuous maps is continuous and integrable on the compact $D$.
$D$ is the disjoint union of the four regions
$$\begin{cases} D_1 &= \{ (x,y) \in D \mid x \lt y\, , x \lt \pi -y\}\\ D_2 &= \{ (x,y) \in D \mid x \lt y\, , x \gt \pi -y\}\\ D_3 &= \{ (x,y) \in D \mid x \gt y\, , x \gt \pi -y\}\\ D_4 &= \{ (x,y) \in D \mid x \gt y\, , x \lt \pi -y\}\\ \end{cases}$$ and a null set.
Moreover $f(x, y) = f(y,x)= f(\pi -x,y) = f( x, \pi -y)$ for all $(x,y) \in D$. Therefore
$$ \iint\limits_{D_i} f(x,y)dxdy = \iint\limits_{D_j} f(x,y)dxdy = 2\iint\limits_{0 \lt x \lt \pi/2\, ,0 \lt y \lt x} f(x,y)dxdy$$ for $(i,j) \in \{1, \dots, 4\}^2$ and
$$I= \iint\limits_{D} f(x,y)dxdy = 8\iint\limits_{E} f(x,y)dxdy$$ where $E =\{0 \lt x \lt \pi/2\, ,0 \lt y \lt x\}$
As $x \mapsto \sin x$ is increasing on $[0, \pi/2]$, $\sin x \ge \sin y$ for $(x,y) \in E$ and
$$\begin{aligned} I &= 8 \iint\limits_{E} f(x,y)\ dxdy = 8 \iint\limits_{E} \sin x \ dxdy\\ &= 8\int_0^{\pi/2} \int_0^x \sin x \ dy dx = 8 \int_0^{\pi/2} x \sin x \ dx\\ &=8 \end{aligned}$$
Note: I think you're confusing in your question single variate maps like $y = \sin x$ and bivariate ones like $f$. Clearly $\sin y$ is not always greater than $\sin x$ on $D$. Just take $(x,y)=(\pi/2, 0)$ to convince yourself.