# Why is ergodicity of transformations only defined for measure-preserving transformations?

In ergodic theory, why does the defintion of an ergodic transformation $T$, why do I have to claim that it is measure-preserving? E.g.

$T$ is ergodic if $\mathbb{P}(A) \in \{0,1\}$ for all $A$ with $T^{-1} (A) = A$

Couldn't I also have this definition without $T$ being measure-preserving ($\mathbb{P} \circ T = \mathbb{P}$) ?

-

Consider $\Omega:=\{a,b\}$ with $a\neq b$, and $P(\{a\})=1/3$, $P(\{b\})=2/3$, $T(a)=b$, $T(b)=a$. Then $P(T^{-1}(\{b\}))=P(\{a\})=1/3\neq P(\{b\})$ hence $T$ doesn't preserve measure. But the only invariant sets are $\emptyset$ and $\Omega$, and their measure is respectively $0$ and $1$.
So in the definition of ergodicity, we have to require $P$ to be measure-preserving, in order to have for example ergodic theorems.