If we're talking "proper math terms", if it "returns a random number" it isn't a function. In math, the value of a function can't change unless the arguments change. If you evaluate it repeatedly with the same argument(s) you'll always get the same result.
Yes, you’re right, good point. Maybe there is no one good term for this case (but given the ocean of terminology, I’d be slightly surprised). ‘Not a function’ also isn’t the right term here because functions of x that returns a constant are okay - they just don’t depend on x. Hashed random functions are true functions but are designed to be non-invertible, so maybe non-invertible (or irreversible) is a decent single term for what @vunderba meant. Other terms that broach it might be ‘non-injective’ and ‘entropy-reducing transform’. I suspect those aren’t technically strong enough for the kind of information loss we need in this context.