Here is the proof of the statement as written in Rotman "An introduction to homological algebra"(but S changed to M and the role of $I,J$ is reversed).
Assume that $M = \oplus_{i\in I} M_i$ where $M_i$ is a simple module for every $i$ and suppose that $N$ is a proper submodule of $M.$
Because $M$ is finitely generated, we can assume that the $M_i$'s are finitely many, and we can name them say $M_1,\ldots,M_n$i.e., $M = \sum_{i \in I} M_i$ where $I$ is a finite set of integers and $Mi$ are subsets of M.
Let $J \subset I$ be a maximal subset such that $ M_J := \sum_{j \in J}{M_j}$ is in direct sum with $N$ i.e.,$ M_J \cap N = \{0\}.$ We claim that $M = N \oplus M_J.$
Proof:
1-$N \oplus M_J \subseteq M.$ this is trivially correct because $N$ is by assumption a proper submodule of $M$ and $J \subset I$ is a maximal subset such that $ M_J$ is in direct sum with $N.$
2- $M \subseteq N \oplus M_J.$
This means we want to show that $ M_i \subseteq N \oplus M_J$ for all $i \in I.$ This inclusion holds obviously if $i \in J.$ If $i \notin J,$ then the maximality of $J$ gives us $(M_J + M_i) \cap N \neq 0.$ Thus $m_J + m_i = n \neq 0$ for some $m_J \in M_J, m_i \in M_i$ and $n \in N,$ so that $ m_i = n - m_J \in (N + M_J) \cap M_i.$Now, $m_i \neq 0,$ lest $m_J \in M_J \cap N = \{0\}$ (actually I do not see that this statement is important in the argument). Since $M_i$ is simple $(N + M_J) \cap M_i = M_i$ that is $M_i \subseteq N + M_J$ for every $i$ as required.
My question is:
I do not understand the importance of the statement in bold in the argument, could anyone explain it to me please?
Since $M_i$ is simple, the only nonzero submodule of $M_i$ is $M_i$ itself. Obviously $(N + M_J) \cap M_i$ is a submodule of $M_i$. Furthermore, it contains a nonzero element $m_i$ (if $m_i=0$, then $0\neq n=m_J \in M_J \cap N = \{0\}$). Hence it must be equal to $M_i$.