Other than integrating Dirichlet function on $[0,1]$, what are practical usage of lebesgue measure? My question is motivated an extremely easy calculus question:

Find the area enclosed by $y=x$ and $y=x^{2}, 0 \leq x \leq 1$.

By simply computing $$\int^1_0x-x^2 dx=\frac{1}{2}x^2-\frac{1}{3}x^3 \big|^1_0=\frac{1}{6},$$ To me it is just a Riemann integration thing and I don't know how to connect this simple question with concepts such as product measure which I have learned.
For example, we have introduced the concept of the section as:

(a) Let $X$ denote a function on $\Omega \times \Omega^{\prime} .$ For each $\omega$ in $\Omega,$ the function $X_{\omega}(\cdot)$ on $\Omega^{\prime}$ defined by $X_{\omega}\left(\omega^{\prime}\right) \equiv X\left(\omega, \omega^{\prime}\right),$ for each $\omega^{\prime}$ in $\Omega^{\prime},$ is called an $\omega$ -section of $X(\cdot, \cdot) .$ An $\omega^{\prime}-$section of $X(\cdot, \cdot)$ is defined analogously.


(b) Let $C$ be a subset of $\Omega \times \Omega^{\prime} .$ For each $\omega$ in $\Omega,$ the set $C_{\omega}=\left\{\omega^{\prime}:\left(\omega, \omega^{\prime}\right) \in C\right\}$ is called the $\omega$ -section of $C$. An $\omega^{\prime}-$section of $C$ is defined analogously.

Also, if I think of the area enclosed by these two functions as a product measure, I want to apply the following theorem to solve the problem:

Let $(\Omega, \mathcal{A}, \mu)$ and $\left(\Omega^{\prime}, \mathcal{A}^{\prime}, \nu\right)$ denote finite measure spaces. Let $C \in \mathcal{A} \times \mathcal{A}^{\prime}$,
then for any $C \in \mathcal{A} \times \mathcal{A}^{\prime}$
$C_{\omega^{\prime}} \in \mathcal{A} $ and $ C_{\omega} \in \mathcal{A}^{\prime},$ for any $\omega$ and $\omega^{\prime}$
$\mu\left(C_{\omega^{\prime}}\right)$ is $ \mathcal{A}^{\prime}$ -measurable and $\nu\left(C_{\omega}\right)$ is $\mathcal{A}$ -measurable
$$
\begin{aligned}
\phi(C) & \equiv \int_{\Omega^{\prime}} \mu\left(C_{\omega^{\prime}}\right) d \nu\left(\omega^{\prime}\right) \\
&=\int_{\Omega} \nu\left(C_{\omega}\right) d \mu(\omega)
\end{aligned}
$$

It seems to me by applying the definition of a section, $\mu(C_x)=x-x^2$, $\mu(C_y)=\sqrt{y}-y$, and $$\phi(C)=\int_{[0,1]}x-x^2 dx=\int_{[0,1]}\sqrt{y}-y dy=1/6$$
The form $$\int_{\Omega^{\prime}} \mu\left(C_{\omega^{\prime}}\right) d \nu\left(\omega^{\prime}\right)$$ look identical to how I would find the area using Riemmen integration.
I am very puzzled because I feel whenever there's a concrete example (when I am expecting to compute an integration), I am always using some techniques that were taught in high school. This is just a naive example provided by our teacher where we are guided to

*

*Use the ordinary calculus to evaluate the area of $C$.

*Describe the sections $C_{x}$ and $C_{y} .$ Evaluate $\mu\left(C_{y}\right)$ and $\nu\left(C_{x}\right)$ by the Lebesgue measures $\mu$ and $\nu$

*Use $\mu\left(C_{y}\right)$ and $\nu\left(C_{x}\right)$ to calculate the area of $C$.

I don't know what exactly I was expecting, I think I am expecting some different forms ended up producing the same output. However, I feel that I gained no insights from this example and have no idea if any steps I have done later would be invalid without the knowledge of the product measure, the section, and the Lebesgue measure. I was told Lebesgue measure is generally more flexible when solving integration problem but to me, it is more like the other way around, even in probability and statistics, if we really want to find the expectation of a random variable, solving $E(X)=\int XF(x)$ is usually done by $E(x)=\int xf(x)dx$. Again, I am using Riemann. I am wondering could someone provide me with an example where the computation will be simpler using a non-Riemann method? I have been puzzled by this confusion for a very long time.
 A: Let me put it this way : Lebesgue measure is not intended to make explicit integral computations easier.
From a practical point of view, any Riemann integrable function is Lebesgue integrable, and in this case Lebesgue integration coincides with the Riemann one (but the converse is not true). From a calculus point of view, most of the integrals we compute in practice are done using Riemann integration techniques. The key role of Lebesgue measure is to provide a powerful, general and theoretical tool for measure theory.
Indeed, in such context, we no longer define the equality between two functions as $f(x) = g(x) \forall x$ but rather $\int_E f ~d \mu = \int_E g ~d \mu$ for all $E$ measurable. An element is no longer defined strictly by its expression but rather by what we can measure from it. Lebesgue measure is the right tool to deal with such equality condition for real functions.
This concept of equality might appear unnecessarily complicated at first, but it is the right way to define it when measure comes into play as we do not want to consider different two elements that will yield the same result for every possible measure evaluation we can make. As you said in the title of the question, $f(x)$ or $f(x)+\mathbf{1}_{\mathbb{Q}}$ are equal from the Lebesgue measure viewpoint.
