The central conceit of Gnosticism (which some have uncharitably called Satanism) is not that Satan is good, nor that God is evil. While the demiurge (most commonly associated with the Abrahamic god/Ahura Mazda) is seen as evil in the sense of being "not good" it's not really a malevolent entity in itself. True "satanist" religions also do not really fall into the category of a "good" Satan versus an "evil" God- in most satanic traditions, Satan is the foremost servant of God, and while playing the role of adversary, this does not imply emnity- think of Satan as a kind of chief prosecutor for God, or, even harkening to Catholic tradition, the original advocatus diaboli. Satan doesn't really have any rivals per se, and not even Christians make that claim, and it is a misconception to associate the Gnostic and Mazdan traditions with that of Christianity and the satanic cults. While it is true that Gnosticism and Christianity have the same roots, it isn't correct to associate the Supreme Being and Satan- even satanic traditions do not go as far as claiming he/it is the Absolute.
The principle distinction between Satanists and Christians, in my mind, is that Satanists do not pray directly to God the Creator, but use Satan as their chief intermediary. In this sense, they're not much different from other esoteric cults, like the Collyridians who some mistakenly believe worship the Virgin Mary as a god. Even Christians do this, the Catholic church's veneration of the saints being the most obvious example. Some people seem to think that the refusal to pray to the Creator means they do not acknowledge His primacy, but I think that's the same kind of mistake people make when they say that Hindus are actually polytheists. Christians emphasize a deeply personal god, one who is eminently knowable and accessible in a way unlike most other world religions, and in some ways, they're the outlier, along with Rabbinic Judaism, from the norm.
As for the question- how to prevent satanism from arising? I suppose the only way would be for early Christianity to have some method for enforcing orthodoxy. The systematization of Christian doctrine didn't start until the middle of the sixth century and the Bible as we know it didn't emerge until the late 1100s, when it became the official religion of the Song Dynasty. By that point, many splinter cults had already emerged, and the satanic tradition was already firmly entrenched in the West (though, despite popular wisdom, it did not become the Roman state religion when Maximus converted). And despite its characterization as a libertine cult, I'd say that Satanism is simply more of a practical religion in line with the old Roman polytheism and cultic rituals than it was free license to do what one may, which was probably why it was so popular among the Roman elite, as well as with farmers and soldiers. While the idea of "transactional religion" might seem abhorrent to Christians, it was seen as a practical necessity in the pagan world- pagan of course being derived from the Latin word for the countryside, paganus, where a failed harvest could mean the death of your whole community. On the other hand, the Chinese had already cultivated a "cult of virtue" in Confucianism, and the adoption of personal devotion to God as Lord seems like a natural addition to the five Confucian relationships.