Huh?! Indeed. Can you imagine how the world would look like if seeds had no way knowing what to grow into? That’s even risky to try: you may grow as a tropical vine where you need to accomodate for a temperate climate!
Seriously. Have you, dear requester, ever heard of DNA? Yep, plants have DNA too.