Assuming for the sake of argument that this works, the offered "science" for why it works is implausible at best. Stick with "magic", at least it has some generally accepted rules.
A needle of unknown composition, hanging from a thread (type again unknown) which inexplicably must be black in color, at some distance from an egg can not be manipulated by naturally occurring atomic electromagnetic or other (weak, strong) forces at distances of scale of many orders of magnitude to swing either straight back and forth or in a circle (based on the sex of the embryo) in the presence of far stronger fields.
The chances of random guesses getting the answer correct 8 times in a row is 1 in 256. If every person in this nation attempted the experiment tonight, something like 1.3MILLION people would be successful. 329 Million would not.
I'm not denying atomic forces - we use them to take PET scans and CAT scans, for instance. Nor am I denying resonant harmonics, which are used for sonograms, among other useful medical diagnostic tools. I am saying its a leap of magic to take the existence of those extremely weak forces and posit some predictable, reproduceable effect with such crude instrumentation in the presence of fields of the same energies of FAR greater strength. Or to suggest that every male has a resonance similar enough to have some macro effect in spite of sharing almost everything of its genetic makeup, and all of its atomic makeup with females, posited to have some other resonance, though differences exist between chicken breeds of far larger genetic variance.
That's a lot of work to hang on the difference between a chicken embryo genetically ZZ and another, genetically ZW. Why not comb type? Skin color? Pattern genes? Feather Pigmentation?
Easier to hang pseudo science on the principles of symbolic and representative magic - the needle's movements, representative of a compass needle, is the indicator or guide, pointing the way. The thread is the symbol of the Moirai, oft called the Fates, in their image of the spinner, the measurer, and the cutter of the thread of life. That's Greek Myth, adopted by the Romans, and continuing to modern society in the imagery of western European heritage. Lachesis is the middle sister, and the needle may also serve as a stand in for her rod, by which she measured to the life of the thread her sister Clotho spun, before Atropos cut it off.
The assemblage moves in a straight line back and forth for the boys as an obvious phallic symbol, and in a circle for the girls for reasons you can hopefully figure out on your own. The direction of rotation, like the water in your toilet bowl, is determined by what side of the earth's equator you are on, no magic needed.