The phrase is informal. I believe there is no reason inherent in the expression.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
Grammar GeekJohn was caught stealing from the toolbox. He got the axe within the hour.
AnonymousDo they get the axeI also heard "to get the boot/sack" to mean "to be dismissed from the job", if you're interested to know more on "being fired"