To your last question first, beaver pelts reigned supreme in hat production because the shaved wool undercoat can be felted quite easily. The hairs are thick, soft, naturally waterproof, and have thick scales and an open barb. Those microscopic hooked features make the felting process much easier and the resulting product much more durable than products made with other animal hairs. Even hats made from a mixture of beaver hair and other hair, like rabbit, benefitted from the structural integrity provided by the inclusion of beaver. (These mixed hats were referred to as demi-castor, where pure beaver hats were castor.)
Felting originated in Central Asia, later spreading to Russia and Asia Minor. Felting became a hugely important industry in Russia through the 1600s, where the production process was a closely-guarded secret and abundant populations of Eurasian beavers provided ample supply of fur. However, those populations became severely depleted by the mid-late 1600s, the same time that the French, English, and Dutch gained access to North American beaver pelts through trade with Native Americans. Chartered companies, such as the Hudson Bay Co. (1670), played an important role in scaling up this business to meet 18th century demand. At first, the pelts were primarily sold as import goods to Russia, which then exported finished products back to Western Europe. However, combing and felting technologies spread to France and England in the 1710s and 20s, including the new development of carroting. (Carrotting is the infamous process of using mercury salts to break down the keratin sheath of animal hair, making it more pliable even when freshly shaved. Mercury is a neurotoxin and exposure was devastating to the mental health and motor control to hat-makers, hence the "Mad Hatter" of Alice in Wonderland fame. As a psychologist, this was my point of entry into learning about this area!)
Beaver hats remained fashionable well into the 19th century because the felting process could accommodate all kinds of stylistic fashion preferences while still retaining functional qualities of durability, warmth, and water resistance. Beaver pelt goods also became an astonishingly valuable trade good for England; between 1700-1770, 21 million castor and demi-castor hats were exported from England to the rest of Europe. Not surprisingly, this had a devastating impact on North American beaver populations as well, which was effectively saved only by a fashion swing toward silk hats that dominated the market by the 1840s.
Backhouse, F. (2015). Once they were hats: In search of the mighty beaver. ECW/ORIM.
Carlos, A. M., & Lewis, F. D. (2011). Hats and the European Fur Market. In Commerce by a Frozen Sea (pp. 15-35). University of Pennsylvania Press.