We know that a $ C^{*} $-algebraic homomorphism from a unital $ C^{*} $-algebra $ A $ to a unital $ C^{*} $-algebra $ B $ is a linear multiplicative mapping that preserves units and respects the $ * $-operations.
There is an exercise that states:
If a mapping $ \Phi: A \to B $ between unital $ C^{*} $-algebras is linear, multiplicative and $$ \forall x \in A: \quad \| \Phi(x) \|_{B} \leq \| x \|_{A}, $$ then $ \Phi $ is a $ C^{*} $-algebraic homomorphism.
I know that as $ \Phi $ is linear, it respects the $ * $-operations. But how can I prove that $ \Phi $ preserves units? Does the proof require the condition that $ \| \Phi(x) \|_{B} \leq \| x \|_{A} $ for all $ x \in A $?
With your definition of C$^*$-homomorphism as unit preserving, the assertion is not true.
Consider $A=M_2(\mathbb C)$, $B=M_3(\mathbb C)$, and $$ \phi:x\longmapsto\begin{bmatrix}x&0\\0&0\end{bmatrix}. $$ Then $\phi$ is a contractive $*$-homomorphism that is not unital.
If you require $\phi$ to be surjective, then it is unital by a basic algebraic fact: for any $y\in B$, $$ \phi(I)y=\phi(I)\phi(\phi^{-1}(y))=\phi(I\phi^{-1}(y))=\phi(\phi^{-1}(y))=y, $$ so $\phi(I)=I$ by uniqueness of the identity.