4 added 294 characters in body

The first two examples can be described more or less uniformly. Associated to a field $F$ is the category $C_F$ of algebraic field extensions of $F$ (whose objects are morphisms $F \to E$ and whose morphisms are commutative triangles). This category has a weak terminal object given by any algebraic closure $F \to \bar{F}$. The full subcategory on the algebraic closures is what one might call the absolute Galois groupoid of $F$ (which is a perfectly canonical construction), and choosing an object in this groupoid (which is not) gives the absolute Galois group.

Similarly, associated to a nice space $X$ is the category $C_X$ of connected covers of $X$ (whose objects are covering maps $Y \to X$ and whose morphisms are commutative triangles). This category has a weak initial object given by any universal cover $\bar{X} \to X$. The full subcategory on the universal covers is (equivalent to?) the fundamental groupoid of $X$ (again, a perfectly canonical construction), and choosing an object in this groupoid (which is not) gives the fundamental group.

So you will get this kind of behavior in any situation where you have a weak universal object instead of a universal one. (This partially covers the third example, since injectivity is also a weak universal property.) A general way to engineer a situation similar to the above two might be to look at something like the category of (epi?)morphisms into an object or (mono?)morphisms out of it in your favorite category and see what happens.

In any case, if you are only interested in these constructions because they produce interesting groups, then I think nowadays the modern thing to do is to produce interesting groups using Tannaka-Krein duality.

3 added 10 characters in body

The first two examples can be described more or less uniformly. Associated to a field $F$ is the category $C_F$ of algebraic field extensions of $F$ (whose objects are morphisms $F \to E$ and whose morphisms are commutative triangles). This category has a weak terminal object given by any algebraic closure $F \to \bar{F}$. The full subcategory on the algebraic closures is what one might call the absolute Galois groupoid of $F$ (which is a perfectly canonical construction), and choosing an object in this groupoid (which is not) gives the absolute Galois group.

Similarly, associated to a nice space $X$ is the category $C_X$ of connected covers of $X$ (whose objects are covering maps $Y \to X$ and whose morphisms are commutative triangles). This category has a weak initial object given by any universal cover $\bar{X} \to X$. The full subcategory on the universal covers is (equivalent to?) the fundamental groupoid of $X$ (again, a perfectly canonical construction), and choosing an object in this groupoid (which is not) gives the fundamental group.

So you will get this kind of behavior in any situation where you have a weak universal object instead of a universal one. (This partially covers the third example, since injectivity is also a weak universal property.) A general way to engineer a situation similar to the above two might be to look at something like the category of (epi?)morphisms into an object or (mono?)morphisms out of it in your favorite category and see what happens.

2 added 224 characters in body

The first two examples can be described more or less uniformly. Associated to a field $F$ is the category $C_F$ of algebraic field extensions of $F$ (whose objects are morphisms $F \to E$ and whose morphisms are commutative triangles). This category has a weak terminal object given by any algebraic closure $F \to \bar{F}$. The full subcategory on the algebraic closures is what one might call the absolute Galois groupoid of $F$ (which is a perfectly canonical construction), and choosing an object in this groupoid (which is not) gives the absolute Galois group.

Similarly, associated to a nice space $X$ is the category $C_X$ of covers of $X$ (whose objects are covering maps $Y \to X$ and whose morphisms are commutative triangles). This category has a weak initial object given by any universal cover $\bar{X} \to X$. The full subcategory on the universal covers is (equivalent to?) the fundamental groupoid of $X$ (again, a perfectly canonical construction), and choosing an object in this groupoid (which is not) gives the fundamental group.

So you will get this kind of behavior in any situation where you have a weak universal object instead of a universal one. (This partially covers the third example, since injectivity is also a weak universal property.) A general way to engineer a situation similar to the above two might be to look at something like the category of (epi?)morphisms into an object or (mono?)morphisms out of it in your favorite category and see what happens.