Consider a function $f(x)$ that is $2\pi$ periodic. Consider another function $g(y)$ that is also $2\pi$ periodic. If I wanted to compute the integral of either of these functions I would do so according to: $$ \int_{a}^{b} f(x)\text{d}x$$ or $$ \int_{c}^{d} g(y)\text{d}y$$
Now, consider a function $h(x,y) = f(x)g(y)$. If I wanted to compute the integral of such a function I would intuitively use: $$ \int_{a}^{b}\int_{c}^{d} f(x)g(y)\text{d}x\text{d}y$$
However, the domain of $h(x,y)$ is $S^1 \times S^1$, and so can be seen as a unit torus. The area element that I have used above is $\text{d}x\text{d}y$, but the area element of a unit torus is $(1+\cos(x))\text{d}x\text{d}y$. What is the correct area element to use when integrating the function $h(x,y)$ above? Why?
You started with an ordinary planar integral over a rectangle in the plane. Then you chose to view it as an integral over a torus. By interpreting the Euclidean integral $$ \int_{a}^{b} \int_{c}^{d} f(x) g(y)\, dx\, dy $$ as an integral over a torus, you implicitly chose the unique flat metric isometric to the rectangle $[a, b] \times [c, d]$ with boundary identifications.
The deeper message is that you can't invariantly integrate a continuous function over a smooth $n$-manifold; you need extra structure, such as a volume form (a continuous, non-vanishing $n$-form), a volume density (the absolute value of a volume form), or a Riemannian metric.