The Masons may say they are not a religious organization, however they do have various rituals which are more of a religious nature than not.
The enimity between the Church and the Free Masons has an interesting history. One instance would be the formation of the Italian Nation, when the Papal States were seized and made a part of the new nation.
Another situation would be the resistance of the Masons among other anti-Catholic organizations against the immigrants coming into the country in the 19th century, many of whom were Catholics. We had things like job offers that said right out.“Irish need not apply.”
While the government was prohibited from establishing a national religion, it was taken to mean "no establishment of a denomination ". Thus the intertwining of government and school systems with a general protestant venue was still in existence in the early half of the 20th century.
That is basically why many of us much older than 60 grew up in what amounted to “Catholic Ghettos”. We had our own neighborhoods, our own schools, our own churches. We didn’t usually mix with non-Catholic kids. World War II when your foxhole mates might be anything, but Catholic started to change all that.