Let $X_n$ be real random variables. In Klenke's book on probability he gives the following result:
If $X_n \geq 0$ almost surely for all $n \in \mathbb{N}$, then $E[\sum_{n=1}^\infty X_n] = \sum_{n=1}^\infty E[X_n]$
I am not sure why the positivity condition is required here. By basic linearity properties of the integral it seems this can condition can be dropped. Is there a reason it is included?
Linearity is about finite sums. Here you have to interchange an expectation with a limit. This is not something you can automatically do, you need to use theorems from measure theory that allow this. In this case the monotone convergence theorem is used, which requires the functions to be non-negative.