It should be understood, also, that not every characteristic of a plant (or animal) is necessarily the "best fit" for current circumstances/environment, etc. EVERY form is an in-between form when considering evolutionary pressures - which are present in one form or another at all times. For example, corn may have evolved to be a tall plant, with its seed pods forming up high off the ground, because that configuration offered protection from many of the types of insects or grubs that might like to eat the cobs. Likewise the husk likely evolved for the same reasons - as a shield vs. pests and the elements. However, other creatures would also be evolving to get what they needed also - like insects who can fly up to the corn cobs, or burrowers who can make their way through the tough, multi-layered husks. So, given more time and exposure to these dangers in a more-or-less isolated ecosystem, corn may very well become something else entirely, with even more, or different protection mechanisms aimed at safeguarding it from whatever contemporary attackers it continually faces.
Also, not every characteristic's development had evolution/survival playing a heavy-hand in its development, especially probably those had from early stages. Think of a line pointed out into space directly at the center of the sun from Earth. It doesn't take many degrees of change to that line's trajectory to miss the sun entirely if you were to travel along the line. Meaning that some things may have started out early one way, and that way decided A LOT of what some characteristic of the plant/animal was going to be like by the time we reached modern day, but basically may be more or less arbitrary if that characteristic has never been entirely necessary for survival.
Lastly, I don't believe that "instincts" apply to plants. There is no central "knowledge" house, or data-store. So a plant doesn't necessarily have "instincts" as you're thinking of them. It has chemical or nastic or (etc.) reactions to environmental stimuli - which it came to have through evolutionary processes. Things the plant needed ended up being fitness cases of its progeny - the best of which were seen to move on to the "next round." The best of those doing the same, etc. Attributes the plants had that helped them survive would have been seen to amplify, and those that were detrimental to survival would be seen to become stunted, or vanish entirely.