Question: I tried getting the answers in similar questions, everyone says that it's not necessary, but if $e$ is the identity element for any binary operation $\*$, which is not associative and commutative, how can

$$a\*e=a=e\*a$$

when it is not commutative, i.e. $a\*b \ne b\*a$?

Even if we get a value by solving $a\*e=a$. Will we get the same value by solving
$e\*a=a$ ?
Please provide an example.

Answer: 
It is possible. $\*$ not being commutative means that $a\*b\neq b\*a$ for some $a,b$, not for all of them. So you may have $a\*e=e\*a=a$ without contradicting that $\*$ is not commutative.
Isn't subtraction a binary function which has an identity ($x-0=x$) although it is not commutative ($5-0 > 0-5$) or associative ($5-(4-3) > (5-4)-3$)?