Apology
This question has a very simple answer which was provided in a comment by @EliKorvigo (and acknowledged by the poster) two years before writing this answer. However the commenter did not post an answer so the poster, instead of withdrawing his question accepted an answer that, although not factually incorrect, is not a full answer to the question. I feel that photosynthesis is an important enough topic that a more comprehensive answer should be provided.
The Fallacy
The poster writes in his question:
“the sole purpose of photosynthesis is to synthesize carbohydrates,
which is only used for energy storage”
In fact, as is emphasized in simpler accounts than bloated biochemistry text books,
“the essential purpose of photosynthesis is to synthesize the
carbohydrates — and from them the other organic compounds — that
constitute living organisms themselves (plants and photosynthetic
bacteria)”
The Purpose of the two reactions of photosynthesis
Dark Reaction: Converts CO2 to carbohydrate compounds
Light Reaction: Converts light energy to chemical energy to enable the
synthesis of the carbon–carbon and other bonds of the carbohydrates,
and the NADPH needed to reduce the CO2.
(For details see e.g. Ch. 20 and Ch 19, respectively of Berg et al.)
Distribution of carbohydrate in plants and other functions
Photosynthesis occurs in those (green) tissues of plants that contain chloroplasts. The carbohydrate product must be distributed to those other tissues that do not contain chloroplasts. This transport is done through the phloem, with the glucose 6-P and fructose 6-P first converted to the neutral transport form, sucrose. (see SparkNotes for a simple summary, or Liu et al. (2012) for a more advanced treatment.)
Although much of the sucrose will be metabolized to provide the structural components that constitute the tissues (especially cellulose), some of it will be used to generate the ATP and NADPH needed for metabolism.
Storage of carbohydrates in plants
The accepted answer can be taken as accepting the fallacy in the question that the purpose of hexose production in photosynthesis is for storage, and further of implying that glucose is the storage form of carbohydrate in plants. Of course, polymeric hexoses, starch and sucrose are the main storage forms of carbohydrate in plants, together with some fats and oils, especially in seeds.