Subgroups of a group If we have a group $G$ of order $10$, and $H$ is a subgroup of $G$ then Lagrange's theorem states each $H$ may be of order $1, 2, 5$ or $10$. Now we have the trivial subgroup $\lbrace e\rbrace$ of order $1$ and the subgroup of $G$ itself. Clearly both of these contain the identity element ($e$). Do all subgroups of a group contain the identity element?
As mentioned, part of the definition of a subgroup is that $e \in H$. Actually there is a deeper reason for this requirement:

We want $H$ to be a group. Then $H$ must have an identity, lets call it $e'$. Now we have in $H$

$$e'e'=e' $$

But this identity must hold in $G$, and multiplying by $e'^{-1} \in G$ we get that
$$e'=e $$

It follows that as long as we ask for $H$ to be a group, with the same operation as in $G$, it's identity must be the identity of $G$.

This is the reason why the definition always asks for $e \in H$.

P.S. If $G$ is finite, as long as $H$ is a non-empty subset of $G$ such that for all $x,y \in H$ we also have $xy \in H$, it follows that $H$ must contain $e$.
Do all subgroups of a group contain the identity element?
YES!  A subgroup is a subset of a group which is a group in its own right.... do all groups require an identity?  YES!!!