You could as easily ask why some people are tall and others are short.
Every feature of humans is subject to
A) genetic variation
B) epigenetic variation
C) environmental variation
D) Social variation
The old “nature versus nurture” debates are 17th century science. We now know it’s all of the above in an endlessly varying mix.
As to smart people having average kids, or tall people having short kids, understand that by and large you don’t carry only the genes to make clones of you. If you have brown eyes that doesn’t mean every descendant of yours forever will have brown eyes.
Simplifying mightily, each of us carry the genes to make pretty much every kind of possible human. We as individuals only use a small subset of the genes we carry. So we’re able to create kids that aren’t clones of us, even after you consider the fact your kid is a mix of you and your partner’s genes.
A better analogy than “you are your genes” is there’s a gigantic deck of many millions of cards. At conception you draw a “hand” of a couple thousand of those cards.
Some of which are discarded and some of which are doubled or trebled during gestation. Depending on luck, food supply, weather, pollutants, etc. This process creates the fetal you.
Then you’re born and luck, food supply, weather, pollutants, etc. continue to work on you. As does your parents’ childrearing skills and social habits for good or ill.
With the end effect that you learn how to play some subset of your cards in the game called “society at your time and place.” You may be skilful or not. Or ref panache45, skilful at some things and sucky at others.
All in all “genes are destiny” is pretty much bullshit from end to end. With the exception of serious defects that foreclose a lot of what we ordinarily think of as being human.