Good day, bro.
I think that before the advent of Freemasonry, there was a confrontation the two poles, religion and atheism. With the advent of Freemasonry has changed the balance of power. In these circumstances, Freemasonry acts as a third power.
That completely contradicts history. Atheism as a large-scale movement did not exist until the early-to-middle 19th century. Before that time, while there might be individual atheists, it was just a personal idiosyncrasy. The two poles were classical conservativism (inherited hierarchical authority, religion/government intertwined, "rights" were collectivized--due to being within a specific class) and classical liberalism (authority is to be derived from ability, religion is a matter of individual conscience, "rights" are inherent and equal to all individuals). Freemasonry represented classical liberalism, thus, it aroused the hostility of classical conservativism. To this day, it is hated by the heirs of classical conservativism and the new poles (such as atheist/leftist collectivism and fascist/rightist collectivism) that have also arisen. Note that these new poles are still forms of collectivism, like classical conservativism.
To forestall nonsensical bluster, many of today's modern "conservatives" are classical liberals (more or less) and many of today's modern liberals are leftist collectivists (more or less). However, some people get superstitiously hung up on the use of names, as if merely calling something by a name made it into that name.
Originally, "liberalism" came from the same root as "liberty", and was about individual freedom. "Conservativism" wished to "conserve" hierarchicial, theocratic/semi-theocratic society from the "erosive effects" of this liberalism. Thus, Freemasonry is, at its heart, a liberal movement in the oldest sense of the term, while anti-masonry is usually allied to conservative movements, in the oldest sense of the term, or their collectivist philosophical heirs.