In my functional analysis textbook, the space $L^1$ is introduced. It is then explained that $|| f || = \int |f(x)|\ \text{d} x$ is not a norm (there are non-identity functions for which this integral is zero). Even if it were, $L^1$ would not be complete: There exist sequences $f_k \rightarrow f$ for which every $f_k$ is Riemann integrable, but $f$ is not. Then, Lebesgue integrals are introduced (after quite some measure theory).
I think this approach is correct, but can't this be done in an easier way?
Concretely, I want to understand why we need all the measure theory to define the Lebesgue integral. For example, I can think of setting up a 'weak Riemann integral' as follows:
Definition: A function $f : D \supset [a, b] \rightarrow \mathbb{R}$ is weakly Riemann integrable on $[a, b]$ if there exists a Riemann integrable function $g : [a, b] \rightarrow \mathbb{R}$, and a countable set $S \subset \mathbb{R}$ such that $f = g$ on $[a, b] \setminus S$. Then we define the weak Riemann integral over $[a, b]$ of $f$ as $\int_a^b f\ \text{d}\nu := \int_a^b g(x)\ \text{d}x$, where the right integral is a Riemann integral.
The example of a Lebesgue integrable function that is not Riemann integrable is a function that assumes another value on the rationals than on the irrationals. This definition works for that case, since the rationals are countable. I couldn't find cases for which this doesn't work (but I think there should be, or someone would have thought of such a simpler definition).
Why wouldn't this work? Is it not rigorous to define an integral like this? Is there a function that is Lebesgue integrable 'weakly Riemann integrable'?