I've seen the following definition of a free object in category theory.
Let $\mathcal C$ be a concrete category. Denote by $U\colon\mathcal C\to\mathrm{Set}$ the forgetful functor. Let $X$ be a set. Then an object $F(X)\in\mathcal C$ equipped with an arrow $f_X\colon X\to U(F(X))$ is called the free object of $\mathcal C$ on $X$ if: for all $A\in\mathcal C$ and any function $g\colon X\to U(A)$ in the category of sets, there exists a unique "extension" $g'\colon F(X)\to A$ in the category $\mathcal C$ such that $U(g')\circ f_X=g$.
I looked at some concrete examples of free objects in the category of groups and the category of modules. In each case, the arrow $f_X$ was injective. Does this follow from the definition? Why isn't it included in the definition?