Why does the author in the forest say that the little mushroom comes out of the soil and still wears a hat?

In order to make the article more vivid and interesting. The author uses figures of speech and personification. Take mushrooms as people, and only people can wear hats. "Wearing a hat" is about the shape of mushrooms after they are drilled out of the soil. The top of mushrooms is like a hat. Describing mushrooms as vivid images of children in hats makes the article more lively and interesting.