The notion of 'operation' seems so arbitrary. In textbooks on group theory, and for example on Wikipedia, they define the group multiplication operation $\circ$ as having properties of:
Closure: For all $a, b\in G$, the result of the operation, $a\circ b$, is also in $G$.
Associativity: For all $a, b, c\in G$, $(a\circ b)\circ c = a\circ (b\circ c)$.
Identity element: There exists an element $e \in G$ such that, for every element $a \in G$, the equation $e\circ a = a\circ e = a$ holds.
Inverse element: For each $a \in G$, there exists an element $b \in G$, such that $a \circ b = b \circ a = e$, where e is the identity element.
I do not understand why axiom (1) is used.
Often, axiom (1) is replaced by defining a function $$ \circ:G\times G \rightarrow G $$ and stating that axioms (2)-(4) hold for this binary function.
Here the closure axiom becomes unnecessary, but more importantly, it is more clear what an operation is, and why the properties of associativity and commutativity are actually special. Furthermore, students will be more careful when doing proofs, because they know that the properties they are using are not valid for ordinary functions.
I'm not questioning the correctness of group theory, but this is something I've wondered about for a while.