Given $K[W]$ the $K$-algebra of polynomial functions on vector space $W$ and a group $G$, consider the linear action:
$$(g,f) \mapsto g \cdot f(w) := f(g^{-1}w) \, \, g \in G, \, \, f \in K[W] \, , \, w \in W.$$
and this is usually known as left-regular representation of $G$. What I don't understand is, why do we need to take the inverse element $g^{-1}$ to define a left action?
Is it required to satisfy the axioms of a representation? But how?
EDIT: adding some additional thoughts:
Ok I got that the motivation is the associativity property in the definition of group action. But what I still don't understand is that if I define $g \cdot f(w):=f(gw)$ then why can't we consider just $h \cdot (g\cdot f(w)) = h \cdot f(gw) = f(hgw) = hg \cdot f(w)$?
Otherwise the law of associtivity is not working:
$g\cdot (h\cdot f)(w) = (h\cdot f)(g^{-1}w) = f(h^{-1}(g^{-1} w)) = f( (gh)^{-1}w)$
and
$((gh)\cdot f)(w) = f((gh)^{-1}(w))$.