According to the page 392 of the book Abstract Algebra by Fooote,
But why composition of a surjective map $\phi$ and an arbitrary (or injective by choice) map $f$ is $\phi'$ an injective map? It's necessary for the map $\phi$ to be surjective in $M ^{\phi} \to N \to 0$ not required to be an injectve map.

The assertion is not that $f\circ\varphi$ is injective, but that $\varphi'$ is injective as a map of homomorphisms. That is, if $f\circ \varphi = 0$, then $f$ is the zero map.
To see this, suppose $f\circ\varphi = 0$. Let $n\in N$. Since $\varphi$ is surjective, there exists $m\in M$ such that $n=\varphi(m)$. So $f(n) = f(\varphi(m)) = (f\circ \varphi)(m) = 0$.
We have shown $f(n) =0$ for all $n\in N$, implying $f=0$.