Lemma: If a set has no proper non-trivial subgroups, then it's cyclic.
Proof: Let meet the criterion. Let be arbitrary. We must then have that is a subgroup of that is non-trivial. Thus, by assumption we must have that is improper, thus equal to . The conclusion follows.
Now, using this lemma and Lagrange's theorem we see that any subgroup of where for some prime must be a divisor of . Thus, any subgroup must be of order . Therefore, the lemma implies that is cyclic for any prime-ordered group.
Your example is just a corollary.