It is not random.
Unless you think omega is randomly obtained.
Often times we are interested in functions of the outcome of an experiment.
for instance, the number of tails in $3$ tosses of a coin.
The experiment yields the following outcomes:(assuming that you rule out extreme events such as the coin vanishes or is eaten by a frog and so on)
$HHH,$
$HHT, HTH, THH$
$HTT, THT, TTH$
$TTT.$
This is your Omega, with $9$ events.
Once you consider the numeric characteristic, number of tails, you obtain
a function of the outcome:
\begin{align}
HHH\mapsto 0\\
HHT, HTH, THH\mapsto 1\\
HTT, THT, TTH\mapsto 2\\
TTT \mapsto3
\end{align}
But in a sense you are right. There is nothing random in a function.
The probability behind Omega can be thought of as aiming to model the ignorance concerning the outcome of the experiment.
In this sense (when you cannot predict the outcome of the event, that is the point on wich you will calculate the value of your function) randomness might apply.