Typically, genes are not the only determining factors which result in particular traits being exhibited in different individuals.
While some traits are indeed strictly determined by inherited genes, environmental factors play a significant role in the observed phenotype in several other traits.
In a number of conditions such as myocardial infarction, we do not inherit a particular disease, but instead inherit susceptibility, or risk factors, that could lead to a particular disease given specific environmental factors.
Indeed, different studies have reported significantly varying levels of genetic contribution to specific diseases, with environmental factors providing a very significant risk themselves in several instances.