The iconic Stetson came onto the market in 1865, and it wasn't popular until the end of the 19th century. Men commonly wore hats on the American frontier, and derby hats were functional for various occasions. Most photographs from that time feature men wearing them and one of the reasons they were popular are because they stayed on in windy conditions.
Frontiersman typically wore hats related to their employment, and they were commonly made of beaver fur-felt and were natural in color. In addition to the derby, men wore flat wool caps, Mexican sombreros, or old Civil War hats (such as the kepi).
As for the ten-gallon hat, it would have been impractical, even if it was impressive to 20th-century moviegoers. Famous lawmen such as Wild Bill Hickok and Wyatt Earp wore low-crowned hats because giant cowboy hats would have made them easy targets for adversaries.The ten-gallon hat got its name from the Spanish word “Galón,” not because it could hold 10 gallons of water. Galón means braid, and many Spanish hats in era had braids on them. One with 10 braids was called a Ten-Galón hat.
The original Stetson was dubbed “The Boss of the Plains,” and it didn't resemble what we think of as a cowboy hat today. It featured a high crown and wide brim and looked a bit like an Amish hat. It was waterproof and shielded the wearer from elements such as the sun and rain. The hat's design, which didn't have a crease on the open crown, stayed the same for several years. John Stetson's classic cowboy hat was possibly inspired by the Spanish-derived hats he encountered after he moved to the West. He created the iconic headwear, which features a crease in the middle of a high crown with a dent on each side, allowing the wearer to remove it by the crown instead of the brim.