If it’s an interview question, that changes everything
You can remind them what the definition of a function is: for the same input, a function always generates the same result. A random number generator is different; it generates a different result each time. So it isn’t a function.
Math.random() is in fact a function; it does not actually generate random numbers, but numbers whose value is difficult to predict from their seed. You would have to take the java.util.Random class apart to find how it is done. The code is in the usual src.zip file.