Used to be used as a tonic to prevent plagues, but mostly it was considered magic and was used to ward off evil diseases and evil spirits
I think it might be toxic if much is used and some are allergic to it, so mostly now it's an insect repellent. At one time it was dried and sprinkled around the house to keep fleas out and somebody recently mentioned that it might be used to get rid of bed bugs. That was in reference to the big bed bug epidemic that was happening a few years ago.
I also read somewhere that it is used sparingly as a sort of musky flavoring for things like eggs or egg salad.
The only thing I know for sure is that the older ladies in my family dried it and used it to keep creepy crawly things out of cabinets and attics.