To have ones hat on ones ass. The ass is not the most common area to place ones hat. Hence the implication that to have ones hat on ones ass is just plain stupid. Often used when drunk to refer to someone who has just broken a pinki promise.
"You sir are an asshat" "Tom come back here, quit being an asshat" "I'm sorry I was an asshat"