This was still a thing especially back when The Wizard of Oz was popular in the 1930's. It's not a modern phenomenon created by Harry Potter. In fact the term wizard has been used to refer to the male magic user since the 1500's. Though witch is often more interchangeable.The idea of witch/wizard being gendered things was created (or popularized) entirely by Harry Potter, I think
The witch king of angmar exists for example
For the sake of MTG, wizards cast spells, witches brew potions