Flowers serve a reproductive purpose for the plant. However, they consist of both sterile tissue and parts directly devoted to reproduction.
Although humankind uses them for ornamentation, flowers evolved with a sexual-reproductive purpose for plants, according to the Arizona Cooperative Extension. Even the bright colors and sweet scents that make them so attractive for your garden promote reproduction by attracting pollinators, even if they don't directly play a role in producing sex cells or fertilization.
Botanists call the female structures of the plant the gynoecium or pistil, which includes the stigma, style and ovary. Pollen clings to the stigma, where it journeys down to fertilize the seed inside the ovary. The pistil emerges as a single stalk at the center of the flower.
The male structures, or androecium, consist of stamens atop filaments. Stamens produce pollen, each grain of which contains two sperm cells. Wind and pollinators carry the pollen to the female pistil, where the pollen grows into a long tube that extends into the ovary. The dusty yellow club-topped stamens surround the pistil in most flowers.