
That's how group theorists want us to think of functions, or permutations, as elements you might chain together by means of a binary operation variously called composition or multiplication.
f(g(x)) and g(f(x)) are respective synonyms for (f*g)(x) and (g*f)(x).
Does commutativity pertain? That depends on the group, if it is a group. Maybe it's a ring too.
Welcome to high school algebra.
The wrapping Function class, shown below, overloads both __mul__ and __call__. We don't just want to compose them, we want to pass them arguments (food) and have them do work (expend energy).
Related thread on math-thinking-l.