Another theory is due to the ‘Gold Rush’ in 19th Century. Popularity of the hats grew when miners travelled to California via the Isthmus of Panama. Many bought the straw hats while passing through, and referred to them as their as 'Panama Hat'.
In 1881, the 23-year project to build the Panama Canal began. Many of the workers wore the hats to fend off the strong tropical sun, also adding to its association with Panama. These hats were perfect for the job since they are lightweight and breathable.
The Panama hat gained even more fame when President Theodore Roosevelt was photographed in one of the hats while visiting the Panama Canal construction in 1906.
The photo was widely published in the U.S. and his new accessory was mistakenly called a Panama hat; from that moment on the name “Panama Hat” really stuck.