The IND-CPA game has two challenge-response phases
A key is generated by running $Gen(1^n)$ and challenger selects a bit b {0,1} uniformly at random.
Adversary gets input $1^n$.
Can query the oracle a polynomial number of times with messages and gets $E_k(m)$ back.
Attacker sends messages $m_0$, $m_1$, challenger returns $E_k(m_b)$.
Can query the oracle a polynomial number of times with messages and gets $E_k(m)$ back.
Why are these two challenge-response phases (3,5) necessary? I understand why at least one phase is necessary (ex: to ensure that deterministic algorithms are not IND-CPA secure), but why both?