Why do they do this when flowers don't really change colors when they die. Grass just goes brown. I don't get it
Why do leaves change color in the fall?
Super Simple Answer: Leaves were always colorful, but you couldn't see it because all the green (chlorophyll) hid it from you. When plants no longer need green (because they're not going to use it over the winter) they stop making it: Green leaves leaves in the winter.
Plants don't use flowers to feed themselves, so the flowers don't have green in the first place.
If things (like grass) turn brown, it's because there aren't any other colors for you to see.
The difference between the color changes in tree leaves as opposed to flowers or grass comes from their purpose to the plant. Both grass and tree leaves are typically green during the growing season because they are using green chlorophyll to make their sugar food from light, water, and carbon dioxide. When the light period changes, the days grow shorter, signaling plants in temperate regions that winter is coming, and there will be less light available for making food. At this signal the plants enter dormancy, the process of which is different for each plant. When a plant stops making food with its green chlorophyll, the green color fades away. Sometimes, however, a plant will have smaller amounts of chlorphylls of different colors, like red and orange, that can then show through. On top of that is also the case of when stored sugar is trapped in the dying leaves, when it also turns red and orange, as opposed to the waste products of metabolism that turn leaves, and I assume grasses, brown.
Flowers are a different story. Their sole purpose is the reproduction of the plant. Each flower has been designed specifically to facilitate this, both by attracting pollinators, and making sure that the pollen reaches the stamen. The colors of the petals are produced not by the food-making process, but by special pigment molecules chosen to make the flower look attractive. Those pigments remain even as the flower dies, though the lack of water and nutrients obviously leads to some changes.
In sum, green generally means a plant is growing, or at least making sugar. Any other color is a result of that process stopping or being interrupted in some way.
Short answer: sugar! Tree leaves store sugar as tree food, which sap carries to roots, etc. When photosynthesis slows with cold temps, sugar gets trapped in leaves, and appears as red/pink/yellow/orange, etc. Some trees have much less sugar and more waste products in their leaves, like many oaks, and therefore don't turn very red.
Some grass gets bright green in winter - check out winter rye!