In standard textbooks, the Lebesgue integral is first defined for f$f$ with values in $[0,\infty]$. Note that the value $\infty$ is allowed, and it is important that it can be taken even on a set of positive measure.
You can see why for example in the one-line proof of the Borel-CantelliBorel–Cantelli lemma:
let $\mu$ be finite, and $A_i$ measurable sets so that $\Sigma \mu(A_i)< \infty$$\sum \mu(A_i)< \infty$. Then a.e. x$x$ belongs to only a finite number of $A_i$.
Proof: $\int \Sigma\ 1_{A_i} d\mu = \Sigma\ \mu(A_i) <\infty$$\int \sum 1_{A_i} d\mu = \sum \mu(A_i) <\infty$. The function $x\mapsto \Sigma\ 1_{A_i}$$x\mapsto \sum 1_{A_i}$ is integrable, hence finite a.e.
If you start with a set of functions $f$ with values in $[-\infty,\infty]$, you will have to assume that either $-\infty$ or $\infty$ is taken only on a set of zero measure (so as to prevent the $\infty -\infty$ problem), and if you want it to work both for $f$ and $-f$, you will have to assume that none of $-\infty$, $\infty$ is taken on a set of positive measure, thus ruling out the kind of argument as in the Borel-CantelliBorel–Cantelli lemma. Which is of course unbearable for an analyst, and even more for a probabilist. But perfectly sound from a functional analysis perspective.