A group homomorphism is usually defined to be a function $\phi$ such that if $x * y = z$, then $\phi x \times \phi y = \phi z$. However, this can be generalized. We could define that a group homomorphism is a relation $\phi$ such that if $x * y = z$ and $(x,x') \in \phi$, and $(y,y') \in \phi$ and $(z,z') \in \phi$, then $x' \times y' = z'$. This reduces to the usual definition in the case where $\phi$ is a function. However, I've never seen this generalization mentioned anywhere. Is there something wrong with it?
My thoughts are that it might have to do with functions having well-behaved preimages. In particular, if $f$ is a function then $f^{-1}(A \cap B) = f^{-1}(A) \cap f^{-1}(B)$. If $f$ were simply an arbitrary relation, this property could (would?) fail.
So my question is, why are homomorphisms usually assumed to be functions? Note that this is not a question about group homomorphisms specifically.