Beginner abstract question. Why does a group operation of an element on itself return 1 or e?

You've mixed yourself up. There are plenty of groups that have elements such that $x^2 \neq 1$. However, if you are dealing with a group such that $x^2 = 1$ for every element, then that group is Abelian.


Asserting that an element $x$ has order $n$ is the same thing as asserting that $x^n=1$ and that $n$ is the smallest natural number with this property.

So, in your problem every element $x$ other than $1$ has order $2$. And what this means is that precisely every element $x$ other than $1$ is such that $x^2=1$.