Background
Exercise: Let $R$ be an integral domain Prove that $R$ is a PID if and only if (i) every ideal of $R$ is finitely generated and (ii) whenever $a,b\in R$, the sum ideal $(a)+(b)$ is principal.
Solution: If $I$ is an ideal of $R$ then by (i), $I$ is generated by some $a_1,\ldots,a_n$. That is $I=(a_1)+\cdots+(a_n)$, Choose $n$ minimal here and suppose $n>1$. Then by (ii) $(a_1)+(a_2)=(c)$ for some $c,$ and $I=(c)+(a_3)+\cdots+(a_n)$ is a sum of $n-1$ principal ideals, contrary to the minimality. Therefore $n=1$ and $I$ is principal.
Questions:
At first I thought the solution to the exercise above, I would solve the exercise, I would simply use induction on the number of ideals in (ii) along with the condition of (i) to show that the ideal $I$ is principal. So I am not sure what contradiction is trying to derive in the presented solution, also why does the issue of minimality on the number of ideals matter?