Suppose I toss $n$ coins. It's natural to model this probabilistically in terms of a sample space $\{ H, T \}^n$ constructed as the product of $n$ copies of the sample space of possible outcomes of a coin toss, with the uniform probability measure. Furthermore the individual coin tosses themselves are naturally functions on this sample space, namely the $n$ functions $C_i : \{ H, T \}^n \to \{ H, T \}$ given by the $n$ projections. These functions are random variables! More precisely they are $\{ H, T \}$-valued random variables, where I haven't chosen any inclusion into $\mathbb{R}$. We can consider, very generally, random variables with values in any set, e.g. random functions, random graphs….
Now suppose we want to ask a question like: what's the expected number of heads? It's natural to model this in terms of a sum of random variables, namely the sum of the $n$ random variables $X_i : \{ H, T \}^n \to \mathbb{R}$ which is $1$ if the $i^\text{th}$ coin is heads and $0$ otherwise. It is not possible to even discuss the sum $\sum_{i=1}^n X_i$ of random variables, which gives the number of heads, if you insist on identifying each $X_i$ with the corresponding pushforward of the probability measure to $\mathbb{R}$, since this is not enough information to determine what the distribution of the sum is; to determine the sum of random variables in general requires that you know the joint distribution of the $X_i$, or equivalently that you know the pushforward of the corresponding map to $\mathbb{R}^n$.
Generally it just turns out that a powerful and flexible answer to the question "what is a random element of a (measurable) set $S$?" is that it's a (measurable) function $X : \Omega \to S$, because this definition allows you to flexibly apply operations to random elements of $S$ as if they were ordinary elements of $S$: for example if $S$ is an abelian group you can take sums, if $S$ is a ring you can take sums and products, etc. So this is a philosophy in which functions into an object are "generalized elements" of that object, which is for example very common in category theory and algebraic geometry.
You could instead decide that a random element of $S$ is a probability measure on $S$. This has the virtue of not depending on an auxiliary choice of probability space $\Omega$ (which is not unique in the above definition, and this is a subtlety that needs to be addressed; I really like Terence Tao's discussion here) but makes it awkward to talk about operations on random variables. As above, to talk about the sum $X + Y$ of two random variables you need to specify their joint distribution, which is a measure on $S^2$, not a pair of measures on $S$. Meanwhile in the usual formalism, to talk about the sum $X + Y$ of two random variables they only need to be functions on the same sample space $\Omega$, which is what equips them with a joint distribution.
You could do everything purely in terms of measures if you really wanted to but it just seems inconvenient to me. It won't suffice to consider measures on $\mathbb{R}$ only.