Time can only go forward, while the height of the ball may change. At each point in time, the ball can have only one height, so for every input, there is only one output. This is the definition of a function.