When defining abstract algebraic structures (like monoids, groups, etc...), are there some constraints on the shape of the axioms, for the structure to have good properties that we implictely use in many proofs (like behaving well with respect to morphisms and quotients)?
For instance, is the following axiom acceptable, in a structure equipped with a unary function $f$ and a binary operator $\circ$: $$\forall x, \text{ if }x\circ x=x\text{ then } f(x)=x.$$
More specifically, does it make sense to study varieties of such objects, even if the whole structure is not a variety, since this axiom is not an equation.