Let $G$ be a finite group where $ G=\{aⁿ \mid n \in Z \} $ or $G=\langle\, a\,\rangle$, so is it necessary that $a^n=e$, where $e$ is the identity of this group?
G is a finite group and elements of G are $a^0,a¹,.........a^{n-1}$(n elements) and a is generator of G hence is also having n elements As unity has already shown up in $a^0,a¹,.........a^{n-1}$ apart from it why aⁿ must be considered e always .
See, if the group $G$ can be generated by the element $a$ then certainly
$|<a>| = |a|$
This is can verified easily.
We know that $ <a>$ consists of $a,a^2, a^3, \ldots a^{n-1},e$, certainly the sequence will end when $a$ attains its order i.e. when $a^n =e$ and $n$ here is the order of our element $a$
Hence this is true that the order of group $G$ is certainly equal to the order of the generator.