Officials have increasingly voiced concerns about threats of violence related to the former president’s trials, as he faces charges that would make it illegal for a store to sell him a firearm.
Enough votes for a dead candidate to win may be converted to a phylactery through a dark ritual known only to certain necromancers in a D.C. pizza restaurant's basement. They take a break from animating Mitch McConnell for a few minutes, cast a spell and we get a lich president.
The most likely answer if a dead person wins the presidential election is that the vice-president-elect becomes president. There are, however other possibilities.
He's doing it simply because he was told he couldn't and he knows his base eats up the whole "rebel against the government" schtick. Which is ironic because they're also, ostensibly, the party of "law and order", i.e. cop-sucking.