It's basically due to different conditions and nutrients (all type chemicals) it gains from environment. It's natural that every part requires chemical in specific amount and exceed of every thing is dangerous for all living things.
Plant secondary metabolites (SMs) are important compounds that add color, taste, and odor to plants and also mediate plant responses to adverse environmental conditions. Plants show variation in the biosynthesis and accumulation of SMs in response to abiotic and biotic factors, which mediate the biosynthesis of SMs. Plants face abiotic stresses in terms of composition and type of soil, temperature stress, light intensity and drought, etc., which significantly influence plant growth and productivity. In contrast, reduction in plant growth and yield due to living organisms is recognized as a biotic factor.
Different plant parts, such as leaves, flowers, stems, and roots, produce various phytochemicals due to their specialized functions and responses to specific environmental conditions. Each plant organ plays a unique role in the overall function of the plant and encounters distinct biotic and abiotic stressors. Consequently, the production of diverse phytochemicals is initiated as a strategic response to these varying challenges, allowing the plant to adapt and thrive in its specific ecological niche.
Biotic stresses in plants are caused by diverse living organisms that include nematodes, bacteria, virus, and fungi. Plants cannot change their position so as to avoid the stressful environment. However, plants exhibit a great degree of tolerance to pathogen attacks mainly through the production of SMs.
Plants are often exposed to a variety of abiotic stresses such as chemical fertilizers, soil type and composition, temperature stress, light intensity, availability of water, and salinity during different ontogenic phases. Plants need apposite quantities of abiotic components, and excess or deficiency of these components trigger variation in the biosynthesis of SMs, which determine plant growth and productivity.
For more details and examples refer to https://doi.org/10.1016/B978-0-12-812689-9.00008-X
As every part of plant has different function, thus it exhibit different chemical composition. Moreover, variation in the developmental stage, tissue specialization, genetic factors, biotic interactions, physiological functions, adaption, resistance potential towards stress and environmental conditions are known to be the facts/reasons behind this.
The chemical composition of plant parts such as stems and leaves can vary within the same species due to various factors.
Functional Specialization: Different plant parts have distinct functions. Leaves perform photosynthesis, while stems support and transport nutrients and water. Each part's chemical composition is adapted to its specific function.
Adaptations to Environmental Conditions: Plants adjust their chemical composition to environmental conditions. Sun-exposed leaves contain more chlorophyll for photosynthesis, while shaded stems prioritize structural compounds. Age of Tissues:
Young and actively growing tissues often have different chemical compositions than mature tissues. For example, young leaves may contain higher concentrations of certain compounds needed for growth and development.
Nutrient Distribution: Nutrients are distributed unequally among different plant parts. While leaves may accumulate higher nitrogen levels for protein synthesis, stems might contain more lignin or cellulose for structural support.
Secondary Metabolites for Defense: Plants produce secondary metabolites, such as alkaloids, flavonoids, and terpenoids, as defence mechanisms against herbivores and pathogens. The distribution of these compounds can vary among plant parts to deter specific types of threats.
Water and Nutrient Availability: Variations in water and nutrient availability can influence the chemical composition of plant tissues. For instance, drought conditions may lead to changes in the concentration of osmolytes or other compounds involved in stress responses.
Genetic Variation: Genetic factors play a crucial role in determining the chemical composition of plant tissues. Different genotypes within the same species may produce varying levels of specific compounds.
Storage Organs: Some plants store energy reserves and nutrients in specialized storage organs, such as tubers or roots. These storage organs can have distinct chemical profiles compared to above-ground tissues.
Seasonal Changes: Seasonal variations, such as changes in temperature and day length, can influence the chemical composition of plant tissues. For example, the concentration of pigments in leaves may vary with seasons.
Herbivore Preferences: Variations in chemical composition can also be influenced by the selective feeding of herbivores. Some plant parts may contain higher levels of compounds that deter herbivores, while others may be more palatable.