If $f:X\to Y$ is a proper morphism of noetherian shemes, then there is a Stein factorization of the form

$$
X \xrightarrow{f'}  Z={\bf Spec} (f_* O_X) \xrightarrow{g} Y
$$where $g$ is finite and $f'$ has connected fibers. Furthermore $g_*O_Z=O_Y$ and 
${f'}_*O_X=O_Z$. It follows that $f_*O_X=O_Y$ if and only if $f$ has connected fibers. So for example, cyclic covers do not satisfy this condition.