Why space time curves in the presence of mass or energy?
Answer: A massive body such as the Earth causes gravity because matter is concentrated energy, hence E=mc². But note that a no mass photon also causes gravity, as done any kind of energy, not just mass-energy. Moreover the energy doesn't actually bend the surrounding space.
Hope this helped you!