It is known that every submonoid of a group $G$ is a subgroup if and only if $G$ is a periodic group, i.e. all of its elements have finite order.
The following question is a generalization of the above fact to groupoids:
Given a groupoid $\mathcal{G}$ (in the category-theoretic sense), is it true that every subcategory of $\mathcal{G}$ is itself a groupoid (hence a subgroupoid) if and only if $\mathcal{G}$ is skeletal (has no morphisms between distinct objects) and the automorphism group of each object of $\mathcal{G}$ is a periodic group?
What is not immediately obvious is the skeletality part.
Suppose $\mathcal{G}$ had distinct objects $a,b$ with a morphism $f\in Hom(a,b)$. Consider the subcategory $\mathcal{C}$ of $\mathcal{G}$ with objects $a$ and $b$ and morphisms $id_a,id_b, f$.
This is a perfectly valid subcategory of $\mathcal{G}$, but it is not a groupoid.