Why should we expect Maschke's theorem to be true? Maschke's theorem tells us that any representation of a finite group $G$ can be decomposed into a direct sum of irreducible representations. The proof does make intuitive sense to me (Intuition behind Maschke's theorem), but my question is really about why we should expect it to be true in the first place.
Sure, we can do some explicit examples (perhaps a most obvious starting point is the standard permutation representation of $S_n$, which has an obvious invariant subspace $\{(x,x,\ldots, x) \in \mathbb C^n: x\in \mathbb C\}$, and almost as obvious complement subspace $\{(x_1,\ldots, x_n) \in \mathbb C^n: \sum x_i = 0\}$), and perhaps one has already seen the result for abelian groups over $\mathbb C$ in the guise of linear algebra: Matrices commute if and only if they share a common basis of eigenvectors?.
However I wonder if there is any other point of view that makes Maschke's theorem feel "inevitable"...since right now, it just seems absurdly powerful/magical.
 A: Maschke's theorem holds for all fields, not just characteristic $0$, and including characteristics dividing the order of the group. You just have to be more careful about how you state it.
If $G$ is a finite group with subgroup $H$, $k$ is a field, a $kG$-module $V$ is relatively $H$-projective if, whenever $U$ is a $kG$-submodule of $V$, and there is a complement to $U$ as a $kH$-module, there is a $kG$-module complement.
Maschke's theorem, in full generality, is the following.
Theorem: Let $G$ be a finite group and let $k$ be a field of characteristic $p\geq 0$. Let $P$ be a Sylow $p$-subgroup of $G$ (where $P=1$ if $p=0$). Every $kG$-module is relatively $P$-projective.
For $p=0$ or $p\nmid G$, this says that every $kG$-module is relatively $1$-projective. Writing this out, that says that if a $kG$-submodule has a $k1$-complement, so a vector space complement (which it obviously does) then it has a $kG$-complement.
This removes the requirement that $p\nmid |G|$, and places Maschke's theorem in a more general context. The intuition here comes from the theory of projective modules, but is unfortunately too advanced for most first courses in representation theory.
A: Finite groups (and more generally compact groups) have an averaging/integration operation that can be used to produce projections onto the trivial submodule. Supposing $V$ is a finite-dimensional $G$-module with $G$ a finite group, then the linear map $\pi:V\to V$ defined by
$$ \pi(v) = \frac{1}{\lvert G\rvert } \sum_{g\in G} gv$$
is both a homomorphism of $G$-modules and a projection, where the subspace $\pi(V)\subseteq V$ has a trivial $G$-action. This projection, by the way, comes from the action of the element $\frac{1}{\lvert G\rvert}\sum_g g$ in the group algebra $\mathbb{C}[G]$, a sort of average over the group itself. Linearity is key here, which is why we don't see a similar sort of thing with plain $G$-actions.
An important example of what this is able to do is give a description of $\hom_G(V,W)$ where $V$ and $W$ are $G$-modules. The characterization of $f\in\hom_G(V,W)$ is that it is a linear map $f\in\hom_{\mathbb{C}}(V,W)$ with the property that $f(gv)=gf(v)$ for all $v\in V$ and $g\in G$. Or, in other words, that $gf(g^{-1}v)=f(v)$. The space $\hom_{\mathbb{C}}(V,W)$ is a $G$-module by the action defined by $(g\cdot f)(v) = gf(g^{-1}v)$ (this corresponds to the action of $G$ on $V^*\otimes W$, which is isomorphic to $\hom_{\mathbb{C}}(V,W)$), so $\hom_G(V,W)$ is nothing other than the trivial submodule of $\hom_{\mathbb{C}}(V,W)$, which by the above analysis gives us that
$$\hom_{G}(V,W) = \pi(\hom_{\mathbb{C}}(V,W)).$$
Another way we can use this is to get decompositions. For example, if $W\subseteq V$ is a $G$-submodule, then the above projection lets us take any map $f:V\to W$ and get a $G$-module homomorphism $\pi(f)$. If $f$ were to have the property that $f|_W=\mathrm{id}_W$, then one can check that $\pi(f)$ does as well since $W$ is a $G$-module. Thus, by letting $f$ be any linear map extending $\mathrm{id}_W$, one gets that $\ker(\pi(f))$ is a complementary subspace to $W$. That's the key step for Maschke's theorem!
So, the inevitability of the theorem might be that finite groups have an averaging/integration operation that can be used to get the trivial part of a $G$-module, and that is very useful when paired with the fact that the trivial part of the space of linear maps is the space of $G$-module homomorphisms.
A: As sort of an anti-answer, why should we expect it to be true? Isn't it a bit surprising when you first see it?
Just look at representations of the most basic infinite group, the infinite cyclic group $\mathbb{Z}$. The representations correspond to matrices, and their decomposition corresponds to the Jordan normal form. For example, the representation $$f: (\mathbb{Z},+) \rightarrow GL_2(\mathbb{C}),\ f(x) = \begin{pmatrix} 1 & x \\ 0 & 1 \end{pmatrix}$$ is not completely reducible.
So what about finite groups? Look at the simplest example, a cyclic group $G = \langle g \rangle$, say $|g| = n$. For a representation $f: G \rightarrow \operatorname{GL}_d(\mathbb{C})$, you have $f(g)^n = I_d$. So the minimal polynomial of $f(g)$ divides $x^n - 1$, which is a polynomial with no repeated roots. Hence $f(g)$ is diagonalizable, meaning after a change of basis $f(g)$ is a diagonal matrix $$f(g) = \begin{pmatrix} \lambda_1 & & & \\ & \lambda_2 & & \\ & & \ddots & \\ & & & \lambda_d \end{pmatrix}.$$
Hence representations of finite cyclic groups are completely reducible.
But why should we expect representations of all finite groups to be completely reducible? I do not think it is obvious at all a priori.
And also it's not true over fields of positive characteristic, here is one example: take a finite cyclic group $G = \langle g \rangle$ of prime order $p$. Then $$f: G \rightarrow \operatorname{GL}_2(\mathbb{Z} / p\mathbb{Z}), f(g^k) = \begin{pmatrix} 1 & k \\ 0 & 1 \end{pmatrix}$$ is a representation which is not completely reducible.
So you somehow need to use the fact that the group is finite, and the fact that the field is of characteristic zero (or more generally, of characteristic coprime to the order of the group). As shown in the other answers, a certain averaging argument does the trick.
A: If $\rho \colon G \to \operatorname{GL}(V)$ is a representation of a finite group $G$ on a finite-dimensional $\mathbb{C}$-vector space $V$, then $V$ can be equipped with an inner product $\langle -, - \rangle \colon V \times V \to \mathbb{C}$ such that every element of $G$ acts by a unitary matrix. This inner product is not mysterious either: take any old inner product $(-, -) \colon V \times V \to \mathbb{C}$ and average it over the group:
$$ \langle u, v \rangle := \frac{1}{|G|} \sum_{g \in G} (\rho(g) u, \rho(g) v).$$
(The same is true over $\mathbb{R}$ if we replace "unitary" with "orthogonal"). The slogan is: we can always find a basis such that every $\rho(g)$ is a unitary matrix.
This makes Maschke's theorem completely inevitable: if a subspace $W \subseteq V$ is invariant under a unitary operator $\rho(g)$, then its orthogonal complement $W^\perp$ is also invariant under $\rho(g)$. So every subrepresentation has a complement, and moreover, doing standard orthogonal projection stuff is an effective way to decompose a vector into its components in subrepresentations.
Of course, Maschke's theorem is true in more generality than just $\mathbb{R}$ and $\mathbb{C}$, and this inner product argument really only works over them, but I think it is illustrative of why it is completely inevitable in certain contexts, and many of the other settings end up being related to these settings anyway.
