The axiom of choice is (so I'm told) often necessary to perform certain proofs.
It is a kind of "meta-mathematical" axiom it seems to me, in the sense that it doesn't relate to any specific mathematical theory (such as groups or topologies), but is kind of "assumed in the background". In this sense, it is similar to logical axioms, like LEM (law of excluded middle).
But the axiom of choice is an axiom of set theory, not of logic, so I am confused by the relation between logical axioms such as LEM, and the axiom of choice. So how does the axiom of choice relate to logic? Is there a sense in which the axiom of choice is a "logical axiom"? Or am I thinking in the wrong direction?
EDIT: Response to some comments: I know that the axiom of choice is an axiom in set theory (though it can also be stated in type theory), and that set theory is a foundation of math. I however am still confused. It seems that we need the axiom of choice to prove certain theorems within a theory $T$, even when the axiom of choice is not part of the axioms of that theory $T$.
For example, take the theory $T$ of groups (i.e. $T$ consists of the group axioms). Then as far as I know, all we need is the logical axioms (e.g. the standard axioms of first order logic), and the group axioms in $T$. Yet somehow we sometimes still in addition need the axiom of choice. How is this possible, given that the axiom of choice is not part of our logical axioms nor the axioms in $T$?