Initially, berets had their history originating in France. They were also used by military troops of France and Spain, which were believed to have influenced their use in other countries. The French Mountain warfare troops are known to have been among the first to incorporate the use of beret in the military. They used the accessory to display their level and status within the organization. At the same time, the beret continued to increase in popularity outside the army. And the beret was mostly used as a fashion statement by women in the 1900s. The beret grew in popularity and gained interest from artists, and the style later became associated with the demographic.
In the U.S., the berets were initially unofficially used by a list of special operations units during and following World War II. After a series of wars in the 1970s, the morale in the U.S. Army decreased. In response, the army authorized local commanders to encourage morale-enhancing distinctions such as berets. Consequently, many units embraced various color berets; for example, armor and ranger units adopted the black beret. Similarly, many other units embraced various colored berets to improve dwindling morale.
So, in contrast, the beret was worn by the military for many reasons, but mainly to boost the morale of the troops. However, most perceived it to the fact that it was cheap and having consequent accessibility. World War II established the beret as a dominant military hat which led to its use as part of official uniforms for soldiers and high-ranking officers.