The
identity function is about the most boring non
constant function possible:
I(x)=x
(note you should probably also say I:X->X to make sure your
domain is OK).
So why bother? Convenience, as always.
Function composition is an associative binary operation; the identity functions are its units (composing an identity function on either end does nothing).
When X is a vector space, the identity function is a linear transformation. Its representation as a matrix is, of course, the identity matrix. More generally, in any group G acting on a set X, the function x|->e*x (where e∈G is G's identity element) is the identity function.
It's unavoidable. So we may as well give it a name...