This expression means to go against common sense to do something stupid, "run into" trouble. But the very word "rampage" comes from hunting traps. Earlier, a rampage was called a hunting samolov for a bear, wolf or wolverine, which, when triggered, pinched the animal's paw. A typical rampage is arranged as follows.
A low tree is chopped off from the branches and a trunk is left about a meter in height, the upper part was split in it to the middle of the length, fixing the halves of this split and hanging the bait. A poor predator, when trying to get prey in a jump, found itself in a trap, getting stuck with its paw or neck, and the lack of support under its hind legs led to the fact that it wedged under the weight of its own weight.
In addition, in some places, a tilted post or the same stake, which was obviously dangerous to climb, was called a horn in some places.
The Russian archers called rozhny both a sharp stake used as a weapon, and a slingshot, which served as a support for muskets, which, if necessary, could also be used for military purposes.
In addition, a stake or spear with which they went to the bear was also called a rampage. Hence the meaning of the expression "what the hell" becomes obvious ...