Range of a random variable - measure theory Let $(\Omega, \mathcal{F}, P)$ be a probability space. 
Sometimes, the convention is used that a random variable is a map from a probabilty space to $\mathbb{R}$, but let's not adopt this. So let $X$ be a random variable with range $E$, 
so $X \colon \Omega \rightarrow E$. 
The question now is: Why must $E$ be measurable? What does it mean for a range not to be measurable?
 A: At some point, whatever may $E$ be, you will want to look at the so-called law $\mathbf{P}_X$ of $X$, which will have to be a probability on $E$, which will have to be endowed with an $\sigma$algebra. To do this, as you already have a probability $\mathbf{P}$ on $\Omega$, you will want to use it, and define $\mathbf{P}_X$ by setting $\mathbf{P}_X(A) = \mathbf{P}(X^{-1}(A))$ for certain $A$'s subsets of $E$. But for the right hand side to make sense, $X^{-1}(A)$ should be measurable in $\Omega$ for $A$ subset of $E$. You immediately get this by assuming $X$ measurable, and defining $\mathbf{P}_X$ on measurable sets of $E$.
A: Do you mean that $E$ is a subset of $\mathbb R$? Then $E$ by itself actually does not need to be a measurable subset of $\mathbb R$ for $X$ to be a valid random variable. For example, consider the coin flip $X$ that is either $0$ or $1$ with probability $1/2$ each.
We can consider $X$ as a function $\Omega \to \mathbb R$. We can also consider $X$ as a function $\Omega \to \{0,1\}$. We can even consider $X$ as a function $\Omega\to E$ where $E$ is some nasty non-measurable set (containing $0$, $1$ and some nasty nonmeasurable set of other real numbers).
The important thing isn't that $E$ is measurable, it's that $X$ is a measurable function. Recall the definition of a measurable function: The inverse image of any measurable subset of the range is a measurable subset of $\Omega$ (that is, a member of $\mathcal F$). In the coin flip example, it is measurable, because the inverse image of any subset of the range (measurable or not!) is either one of the following 4 options: the empty set, the whole $\Omega$, the "half" of $\Omega$ that goes to zero or the "half" of $\Omega$ that goes to one. (Think why.)
