This process is called electron-positron annihilation. It's a fundamental interaction in particle physics and a great example of how energy and matter can be converted into each other.
Here's why two photons are produced:
* Conservation of momentum: The electron and positron have opposite momenta. To conserve momentum, the resulting photons must also have opposite momenta.
* Conservation of energy: The total energy of the electron and positron is converted into the energy of the two photons. The energy of each photon is equal to the rest mass of the electron (or positron) plus any kinetic energy they might have.
* Conservation of charge: The electron and positron have opposite charges, so the resulting photons must have zero net charge.
The photons produced in this annihilation are gamma rays, which are high-energy photons.