What's the point of an inclusion function defined $\to X$? The inclusion function is defined in my notes as follows

Let $A \subseteq X$ for any set $X$. The inclusion function $i:A \to X$ is defined by $i(a)=a$ $\forall a \in A$.

Well, what I don't get is, isn't this essentially $A \to A$ and not $A \to X$ exactly? I mean if I think about it, $i$ is restricted in the sense that every $a$ will be sent to itself. $a$ cannot be sent to any elements in $X\setminus A$. So, technically speaking, while $A \to X$ sin't wrong or anything, since the domain is $A$ thereby $a$s only, this will be sent to $A$...no?
Why say $A \to X$? Is there an element $a \in A$ that will be sent to some element in $X$ which isn't in $A$ by $i$? I ask this because, well, math has always demanded accuracy and elimination of redundancy and be concise, and this, seems a bit off to me in that sense.
 A: You're right to point out that $\forall a\in A,\, i(a)\in A$, so it is legitimate to ask why $i$ is not defined as $i:A\rightarrow X$.
As I see it, we define it this way to keep track of $X$. We don't want to lose the information that when we define an inclusion map, we see $A$ as a subset of $X$, and not just some set. That would be an explanation of why we keep $X$ in the definition of $i$. If you write $i:A\rightarrow A$, it's nothing else than the identity function of $A$, and we want to insist on the fact that this is an inclusion map. We don't really care if this map is not onto.
A: Sometimes, it is convenient to make the codomain larger, especially when the codomain has some implicit associated structure, e.g. a topology.
Consider the following two statements, where $A \subseteq X$:

The function $f: A \rightarrow A$ defined as $f(a)=a$ is continuous.

and

The function $f: A \rightarrow X$ defined as $f(a)=a$ is continuous.

The first one is trivial, the second one relates two different topologies.
It is also more convenient to compose functions $A_1 \xrightarrow{f_1} A_2 \xrightarrow{f_2} A_3$ when the codomain of $f_1$ is the same as the domain of $f_2$. Inclusion between them would suffice to compose functions, but if we only have inclusion we often need to care about whether the image of $f_1$ has a topology which is related with the one of the domain of $f_2$.
This is inconvenient.
