It's a function because there's only one y-value for any x-value used by the graph. That's the definition of a function: exactly one y-value (output) for each x-value (input).
Pick and x-value and ask, "What's the y-value for this x-value on the graph?" You only get one answer.