Sorcery or magic (φαρμακεία) is regularly condemned in Jewish literature (Exod 7:11, 22; 8:14; Isa 47:9, 12; Rev 18:23; cf. Wis 12:4; 18:13), for instead of trusting in God, people try to manipulate circumstances to bring
about the end they desire. Sorcery, then, turns one from trust in the living God to dependence on other sources.
See Galatians in the Zondervan Exegetical Commentary Series on the New Testament.