The conventional explanation is that “10-gallon” refers to how much liquid could be carried inside the hat. In fact, a famous ad for the Stetson company once even depicted a cowpoke giving his weary horse a drink from the crown of his hat.