I'm having trouble understanding how the definition of a measurable function relates to the notion of random element and random variable. The definition I have at hand states the following:
Let $(\Omega, \mathcal{F})$ and $(\Lambda, \mathcal{G})$ be measurable spaces and $f: \Omega \rightarrow \Lambda$. Then $f$ is a measurable function if and only if $f^{-1}(\mathcal{G}) \subset \mathcal{F}$.
I thought I understood this definition as I read it. Translated to less rigorous language, it states that, if there is a set of events $w \in \Omega$ such that $f(w)= \mathcal{G}$ and $w \in \mathcal{F}$, then $f$ is a measurable function. Even more plainly, if the whole $\sigma$-field of $\Lambda$ is a subset of $\mathcal{F}$, then $f$ is a measurable function if it maps that subset to that $\sigma$-field.
However, right after the definition it is stated that, in probability theory, $f$ is called a random element and denoted $X, Y, Z...$, and that if $X$ is measurable from $(\Omega, \mathcal{F})$ to $(\mathcal{R}, \mathcal{B})$, then it is called a random variable. And here is when I feel lost.
How is the fact that $X$ is measurable from $(\Omega, \mathcal{F})$ to $(\mathcal{R}, \mathcal{B})$ related to what we understand, in probability and statistics, as a random variable? Why is the function that relates some subset of $\mathcal{F}$ to the $\sigma$-field of $\Lambda$ a 'random element'?
Note. I know similar questions have been answered here and here. However, the answers did not make emphasis on the notion of randomness, which is the one I am confused, so they did not help me.