To add another way to look at it (thinking of a function as a set of tuples):
With tuples (A,B), you're listing As uniquely paired with Bs
With functions (A -> B), you're listnig unique sets of (As non-uniquely paired with Bs), so each A can go to any value of B, with replacement.