Given the following contour integral: $$ I=\int\limits_{-1}^1 |z| \ \mathrm{dz}, $$ with path of integration being the upper half of unit circle, it can be parameterized to give: $$ \int\limits_{-1}^1 |z| \ \mathrm{dz} = -\int\limits_\Gamma |z| \ \mathrm{dz}, $$ where $\Gamma = e^{it}, \ t\in[0,\pi]$ and $\mathrm{dz}=ie^{it}\ \mathrm{dt},$ so $$ -\int\limits_\Gamma |z| \ \mathrm{dz} = -\int\limits_0^\pi |e^{it}|\ ie^{it} \ \mathrm{dt} = -i\int\limits_0^\pi e^{it} \ \mathrm{dt} = -i\left[ -ie^{it} \right]_0^\pi = -i^2-i^2 = 2. $$ Since $f:\Gamma \to \mathbb{R} \ $ given by $f(z)=|z|$ is a real-valued function of a complex variable, it can be visualized in 3D. And interpreting integral as "area under curve" it would seem natural to assume that $I=\pi\ $ which is incorrect.
The question is: what's wrong with this intuition and what's the correct way to think about the geometry of these types of integrals?
Contour integrals in complex anaylsis are not areas under a curve. Instead, contour integrals rely on the interpretation of integrals as continuous weighted sums of differences. In the reals, an integral $\int_a^b f(x)\mathrm dx$ is the continuous version of a sum of the form $\sum_{k=0}^n f(x_k)\Delta x_k$, where $\Delta x_k:=x_{k+1}-x_k$. Basically, we add up differences in $x$, but they are weighted with $f(x)$. When working in the reals, this happens to correspond to an area ($f(x_k)\Delta x_k$ is the area of a rectangle). But if we move on to complex numbers (and replace $x$ by $z$), neither $f(z_k)$, nor $\Delta z_k$ are real, except in the special case where we integrate along a horizontal line and $f$ is real on that line. In your case, $f$ happens to be real on the contour, but the differences $\Delta z_k$ along the contour are not. So the weighted sum which becomes the integral in the limit where $\Delta z_k\to0$ is not real, and thus not an area.
To get an area under the curve we would have to consider sums of the form $\sum \vert z\vert \vert\Delta z_k\vert$ instead.