Witches’ brooms are caused by stress to the plant. Trees can be infected by a fungus, phytoplasmas (which are wall-less single-celled organisms), or parasitic plants like mistletoe.
These structures can be beneficial to wildlife, providing shelter for animals such as flying squirrels. There are also species of moths that rely on these for shelter as well as providing food for their larva.
Cutting from witches’ brooms can be grafted onto normal root-stocks creating weird, dwarf cultivars that people collect.
The photos here are of a Witches’ Broom growth on a sand pine, Pinus clausa in Wekiva Springs State Park.