Forest fires make more trees then they destroy?

Some pine trees, including Monterey Pine and Pond Pine, have cones that stay tightly closed, making it impossible for the seeds to get out, until they are exposed to high temperatures such as are found in a forest fire. These are called “fire climax pines”. Seeds cannot germinate to form new trees until the parent trees have been destroyed in a forest fire, assuring that the new trees will not have to struggle in darkness among adult trees, but will only be among trees of the same age. When there is a fire, the number of seeds released is great enough to assure survival of enough new trees to reforest the area. Fire climax pines are able to maintain their presence against the incursion of other species of trees because fire destroys all of the adult trees, but only the pines are naturally replanted.
Reference: Fire climax pines (link)

So how does evolution explain how a tree evolves the ability to only reproduce after a fire? And to also know to put a chemical around it’s seedlings so that they are not destroyed by the fire the parent trees are destroyed by? Maybe it has something to do with trees having a consciousness (link). And how some pine trees also know when to put up crosses for Easter (link).