Why is photosynthesis an endothermic reaction?

Why is photosynthesis an endothermic reaction?