What makes it necessary to define the graph of a function $f:A\rightarrow B$ as $$\{(x,f(x))\mid x\in A\}$$ which makes it a subset of $A\times B$, when this is equal to the function itself, which is defined to be a left-unique and left-defined relation from $A$ to $B$ — and thus a subset of $A\times B$, too?
EDIT: I disagree that with this set-based approach information about the domain and range would get lost, because as I perceived it, there is no definition of a “function”, but rather of a “function from A to B”, in mathematical terms: $f$ is a function from $A$ to $B:\Leftrightarrow f$ is a relation between $A$ and $B \land \forall a\in A\exists! b\in B: (a,b)\in f$.
If we now want to construct some definitions regarding functions, we do not write “Let $f\subset A\times B$”, but rather write “let $f$ be a function from $A$ to $B$”. This makes by definition $f\subset A\times B$, but also preserves the additional information as the domain etc.
Identifying the graph with the function is a common approach in set theory, especially elementary set theory. It is awkward in other disciplines, where it is more convenient for a function to be a special kind of object which can have properties that are specific to functions (continuity, for example).
A case of this from topology is that if $A$ and $B$ are topological spaces, then the graph of a function can be naturally made into a topological space (it has the subspace topology inherited from the product topology on $A \times B$). So now by making this identification we are saying that a topological space and a function are the same object, which is confusing at best. Similar problems occur in algebra or indeed anywhere where the product has more than just its set-theoretic structure.
Another problem is that the graph does not have the domain conveniently "stored"; it has to be extracted from the projection, whereas the domain of a function is usually regarded as an inherent attribute of the function. Even worse, the codomain isn't accessible from the graph at all; the best way one could define the codomain from the graph would be to identify it with the image. This would be a problem for defining surjectivity and related notions.