Yes, they can and do. Eight Presidents have died in office.
What about the other 35-odd number?
Well, let's do the arithmetic:
8 dead Presidents/43 total Presidents = a historical 18.6% chance that a sitting President will make a VP the President of the United States of America by dropping dead.
18.6% is a higher risk than playing Russian Roulettte with one of these:
Life (and politics) has risks.
Yes, life and politics do have risks and those risks can be categorized into necessary or unecessary risks and sensible or foolish risks.
On your next flight on a small private aircraft, would you be willing to take an 18.6% risk that I will be the pilot? I will fly you anywhere in the continental U.S. for free if you do.
Life has its risks. Go for it.
Is the United States States of America of so little importance that a responsible presidential candidate should uneccessarily take an 18.6% historical risk of putting an unqualified man in the Oval Office?
However, in over the last 100 years there have been 18 and only 3 have died in office.
Suddenly, the percentage has drammatically decreased (become better)