Genes do not exert their influences in a bubble, unaffected by the world around them. They interact with the environment. Imagine this, you were born into a musical family. Your father is a concert pianist and your mother composes jingles for TV adverts. Her parents both played in an orchestra and his parents were jazz musicians. The traits that make them great musicians: perfect pitch, rhythm, creativity, physical dexterity, determination etc. are likely to be passed on to you. In part, these traits will be passed on genetically through the DNA information your parents pass down, but they will also be passed down through the environment. Your home will be full of music, books about music, instruments to try, conversation about music etc. You will inherit music both genetically and environmentally.
Imagine now that you were adopted at a very young age and your adoptive parents had no particular musical ability or interest. You grew up in a home with no music, or books about music, or instruments to try, but you still got all the genetic gifts of great musical ability from your biological parents. It may be that those gifts never get to flourish, or are directed elsewhere, maybe into poetry or creative writing. However, there is a good chance your environment will respond to your genetic musical ability. A teacher at school may notice that you sing very well in assembly and suggest you join the choir. Your enjoyment of music and strong sense of rhythm may make you turn saucepans into a drum kit or ask your parents for a guitar.