How can someone who has had a triple bypass surgery still die of a heart attack?

Secondary prevention. By 10 years after bypass, there is a 50% risk of having experienced closure of one or more vein grafts. Bypass is not a cure. Atherosclerosis is an ongoing problem and requires lifelong treatment of risk factors.
Multiple reasons. Either one of the bypass grafts had closed or an area of the heart that hadn't received a bypass graft can still get a heart attack.
Blocked blood vessel. A bypass surgery basically provides new plumbing for the heart, adding new pipes to carry blood because the old pipes are blocked. Unfortunately, the same problems that caused blockages in the old pipes can affect the new ones, causing blockages in the bypass blood vessels. These blockages in turn can lead to a heart attack.