This is the condition which gives the Shimura variety the (almost) complex structure, which is obviously necessary if you want to view it as a variety over $\mathbb C$. This is explained in Theorem 1.21 of Milne's notes (in slightly different language, but all the equivalences are established later in the text), but let me summarize here.
Let $(G,X)$ be a Shimura datum, where $X$ is the conjugacy class of maps $h:\mathbb S\to G_{\mathbb R}$. At the level of real points, $h$ gives a map $h:\mathbb C^\times\to G(\mathbb R)$, which via the adjoint action gives an action of $\mathbb C^\times$ on the tangent space of $G(\mathbb R)$ at the identity. The subspace on which this subgroup is trivial coincides with the subspace tangent to the compact subgroup $K$ stabilizing $h$, which gives an action of $\mathbb C^\times$ on the tangent space $T_hX$. Now the condition on weights comes in, and tells us that the only characters of $\mathbb C^\times$ occurring in the complexification $(T_hX)_{\mathbb C}$ are $z$ and $\bar z$, and $T_hX$ can be identified with the subspace of the complexification on which the character is $z$. This equips $T_hX$ with a complex vector space structure, and by homogeneity, $X$ receives an almost complex structure.