Children born with intestines outside body, is it all because of genetics?

No. Both ompahlocele and gastroschesis are associated with the bowel being outside the abdominal wall. It only rarely runs in families and has more to do with maternal factors like smoking, infection during pregnancy, or exposure to certain medications.
Yes. What your are describing is an embryonic defect in the abdominal wall. This is often due to some genetic abnormality during embryo development. There are a number of conditions that this can be a part of. This includes Beckwith-Wiedeman syndrome. There are others as well. The child should have genetic testing and a genetic evaluation by a geneticist performed. If not then at least DNA banking.