$\require{AMScd}$Here are two results about groups:
(The third isomorphism theorem) Suppose that I have $A \triangleleft B \triangleleft C$ and $A \triangleleft C$. Then $C/B \cong (C/A)/(B/A)$.
(An exercise I just assigned my students) Suppose that we have $X \triangleleft Z$ and $Y \triangleleft Z$ with $X \cap Y = 1$. Then $(Z/X)/Y \cong (Z/Y)/X$.
Vague question a student just asked me: Is there some general context in which to think of these results and why they look similar?
We can write these as diagrams with exact rows and columns: \begin{gather} \begin{CD} @. @. 1 @. 1 \\ @. @. @VVV @VVV \\ 1 @>>> A @>>> B @>>> B/A @>>> 1 \\ @. @| @VVV @VVV \\ 1 @>>> A @>>> C @>>> C/A @>>> 1 \\ @. @. @VVV @VVV \\ @. @. C/B @>\cong>> (C/A)/(B/A) \\ @. @. @VVV @VVV \\ @. @. 1 @. 1 \end{CD} \\ \begin{CD} @. @. 1 @. 1 \\ @. @. @VVV @VVV \\ @. @. X @= X \\ @. @. @VVV @VVV \\ 1 @>>> Y @>>> Z @>>> Z/Y @>>> 1 \\ @. @| @VVV @VVV \\ 1 @>>> Y @>>> Z/X @>>> (Z/X)/Y \cong (Z/Y)/X @>>> 1 \\ @. @. @VVV @VVV \\ @. @. 1 @. 1 \end{CD} \end{gather} If we were in an abelian category, these would be two forms of the octahedral axiom.
Vague but more technical question: Is there something like a semi-abelian category which includes the case of groups, and where we have something like an octahedral axiom?