Well, as with most things in human civilization, it starts with beer...
https://brewhoppin.com/2015/10/the-truth-of-women-and-beer-witches/
https://brewhoppin.com/2015/10/the-truth-of-women-and-beer-witches/
Witch and 'brewster'
During the early medieval period in Europe, the beer industry was largely run by women. "Ale wives," who sold the beverage and ran the local taverns, played an important role in the beer trade. Female brewers, commonly referred to as "brewsters," were the primary producers of ale.
And as McLennan explained, the traditional clothing worn by brewsters bore more than a passing resemblance to the contemporary witch costume.
"If you look at the stereotypical witches' garb that we think of — a cat, a pointed hat, a broom and a bubbling cauldron, for instance — those are all pieces of equipment essentially that brewsters would have used in their trade," she said.
The women made their beer in large cauldron-like vats. When the product was ready to be sold, they signaled its readiness to customers by driving a tall, broomstick-like "ale stake" into the ground outside their door.
"People walking by their house would see the ale stake and know, 'Oh — I can go in and purchase the ale, it's ready to be sold,'" McLennan said.
In the marketplace, brewsters and ale wives wore high-pointed hats in order to stand out among the crowded throngs of potential customers.
As for the black cat sidekicks, women of the time were heavily reliant on felines to protect their grain stores from vermin.