I have the following definition:
Let $X$ be a set. The free group genereted by $X$ is a group $F$, if there exists an injection $i:X\to F$ s.t. for all Groups $G$ and (not neccesarly injectiv) morphisms $j: X\to G$ there is a unique grouphomomorphism $f:F\to G$ such that the diagram commutes.
I'm wondering about why we ask that $i$ has to be injective and why $j$ dont has to be. Is there a specific reason? What would happen if I would allow $i$ to be not injective? What would happen if I would allow just injective $j$s?
You do not need to assume $i$ to be injective; if $(F,i)$ have the property that for every group $G$ and every function $j\colon X\to G$ there exists a unique group homomorphism $f\colon F\to G$ such that $f\circ i =j$, then you can deduce that:
Indeed, to show that $i$ must be one-to-one, let $G=\{1,x\}$ be the two element group, and let $x_1,x_2\in X$, $x_1\neq x_2$. Define $j\colon X\to G$ by $j(x_1)=x$ and $j(y)=e$ for all $y\neq x_1$. Then the existence of $f$ tells us that $$f(i(x_1)) = j(x_1) = x\neq e = j(x_2)=f(i(x_2)).$$ But since $f$ is a function, we conclude that $i(x_1)\neq i(x_2)$. Thus, $i$ is one-to-one.
To prove that $F$ is generated by $i(X)$, let $G = \langle i(X)\rangle$ be the subgroup generated by $i(X)$, and let $\iota\colon G\hookrightarrow F$ be the subgroup inclusion. Let $j\colon X \to G$ be the map sending $x\in X$ to $i(x)\in G$. Then there exists a unique morphism $f\colon F\to G$ such that $f\circ i = j$.
Likewise, since $\iota\circ j\colon X\to F$, there exists a unique morphism $g\colon F\to F$ such that $g\circ i = \iota\circ j$. Now, since $i=\iota\circ j$, we have $g\circ\iota\circ j = \iota\circ j$, so by uniqueness it must be the case that $g=\mathrm{id}_F$. Now, $$(\iota\circ f)\circ i = \iota\circ(f\circ i) = \iota\circ j,$$ so the uniqueness clause tells us that $\mathrm{id}_F=g=\iota\circ f$.
Since $\iota\circ f$ is bijective, it follows that $\iota$ is surjective; since $\iota\colon G\hookrightarrow F$ is already one-to-one, we conclude that $\iota$ is bijective, and therefore that $G=F$; thus, $F$ is generated by $i(X)$.