Heart bypass surgery is necessary when there is significant blockage or damage to the coronary arteries that supply blood to the heart, or for those who have had a heart attack or are at high risk of one.