Yes, it's not just a function - there are strings attached but we deserve a better name - probability function is x100 better. "random variable" is exceptionally bad in that it leads the mind in irrelevant directions.
To follow one of the more common patterns for identifying a class of functions, it could have been named after one of the early pioneers in the field. But yeah, it would be hard to do worse than random variable, which is illogical and misleading.