If $\pi$ is a representation of a lie algebra $\mathfrak{g}$, why is $\pi(x)$ not required to be invertible? The definition of a representation of a group $G$ is a homomorphism $\pi: G\to GL(V)$. So here $\pi(x)$ is an invertible linear map $V \to V$.
The definition of a representation of a lie algebra $\mathfrak{g}$ is a homomorphism $\pi: \mathfrak{g} \to End(V)$. So here $\pi(x)$ is just a linear map.
What is the motivation for not requiring invertibility? Is this something with category theory?

If $\pi: G \rightarrow \operatorname{GL}(V)$ is a representation of a Lie group $G$ on a finite dimensional vector space $V$, then the differential $d \pi: \mathfrak g \rightarrow \operatorname{End}(V)$ is a Lie algebra representation of the Lie algebra $\mathfrak g$ into the space of all linear maps from $V$ to itself.
Originally, Lie algebra representations showed up as differentials (tangent space maps) from ordinary group representations, which are invertible.  These differentials are, in particular, linear maps.  They send $0$ to $0$, and therefore you are forced to deal with non-invertible elements of $\operatorname{End}(V)$.
