If you go read the abstract of the study cited, you should note that the mean age of the physicians interviewed was 68. I think hospitals do a lot of unnecessary CPR if the wishes of the patient are not known. If someone expires after a long illness or after a very difficult surgery there is little and less chance that perfunctory CPR will be helpful. There is a lot of difference for a relatively fit person who collapses on a treadmill. The odds are stacked against them but its not nearly so futile.
The study asked about "preferences of physician-participants for treatment given a scenario of irreversible brain injury without terminal illness", which is a very different scenario than randomly having a heart attack when you're 50 and otherwise in okay health.
Random heart attacks in people who are otherwise in ok health are not common.