The Clear Biblical Basis
The primary motivation for civil disobedience by Christians can be found in Acts:
|Then Peter and the other apostles answered and said, We ought to obey God rather than men.
This is the primary motivation cited for Biblical civil disobedience. There are, however, other factors involved, especially in the United States, which may be more prevalent among Christian populations even though not directly inspired by Biblical motivation.
In the passage in Acts, the "obey God" was referring to God's command to spread the Gospel. It showed that when God gives a specific command, the government cannot override that command, and in particular, God has commanded us to always spread the Gospel. This seems to be in line with other Bible accounts of commended civil disobedience, such as those in the book of Daniel.
Essentially, if the government ever tells you to stop preaching the Bible, you still preach the Bible.
The Cultural and Historical Context
To fully understand the common justification to compare COVID mask mandates with Biblically sanctioned civil disobedience, it is important to consider the cultural context. The United States has historically been a Christian Nation, but the influence of Christianity has waxed and waned through different periods creating a unique culture. In particular, because of influence during the 1970s and 1980s there has been the growth of a particular culture in America which can often conflate Christian religion and doctrine along with conservative and patriotic politics. In practice, what you are seeing is this mix playing out in public life.
Jesus' direct example regarding politics was to simply "render unto Caesar what is Caesar’s" and then generally stay out of politics, as in this example in Matthew (emphasis mine):
|15 Then went the Pharisees, and took counsel how they might entangle him in his talk. 16 And they sent out unto him their disciples with the Herodians, saying, Master, we know that thou art true, and teachest the way of God in truth, neither carest thou for any man: for thou regardest not the person of men. 17 Tell us therefore, What thinkest thou? Is it lawful to give tribute unto Caesar, or not? 18 But Jesus perceived their wickedness, and said, Why tempt ye me, ye hypocrites? 19 Shew me the tribute money. And they brought unto him a penny. 20 And he saith unto them, Whose is this image and superscription? 21 They say unto him, Caesar's. Then saith he unto them, Render therefore unto Caesar the things which are Caesar's; and unto God the things that are God's. 22 When they had heard these words, they marvelled, and left him, and went their way.
However, modern Christian Conservatives in the US hold to patriotic ideals that include the belief that the US government was itself a gift from God, and that the founders had passed on a stewardship to future citizens which require them to be active in government as part of what they are rendering unto Caesar. They believe active involvement is what the government asks of them, and that it is in this manner that will preserve the freedoms that God originally granted on the founding of the nation.
Unfortunately, this can muddy the waters a little, and it can potentially lead to conflicts where one must weigh actions across a spectrum. On the one end there are clearly Biblical imperatives such as "Don't stop preaching the Gospel", and on the other are political positions with only vague Biblical support based upon supposed contextual obligations, such as "Don't allow the government to take away God-given freedom".
Adding to this, there has been a more recent cultural shift away from what this Conservative Christian culture sees as both Christian and historically patriotic, primarily by politically progressive influences. The consolidation of power and growing influence of secularization in sectors such as media and academia have bred distrust and a sense of antagonism to modern Christian Conservatives. Up to the point of the epidemic, there had already been actions seen as attempts to silence Christian voices, including the growing "cancel culture" and also political voices during that election cycle.
There are also a non-trivial number of Conservative Christians in this group in the US who hold to certain ideals, such as a plain-text reading of Genesis 1-3 which seems to contradict the ideas (Abiogenesis, Common Descent) which are prevalent and often cited as being foundational to currently accepted principals used by the current medical community. This may cause them to be more skeptical of that community than most other cultures. While they do not typically (depending upon the group) reject medical advice or treatment, they tend to often favor holistic approaches which rely upon God's providence in the creation of the human body, and are more likely to rely upon hygiene and prayer than the average person. These considerations certainly have an impact on how they might view the effectiveness of things such as mask mandates in the absence of clear medical information.
These cultural convictions came to a clash with the government during the COVID-19 epidemic. Amid this context of distrust and uncertainty, the government, as well as the medical industry, put forth several changing and conflicting messages, leading to further distrust and uncertainty about the motivations behind the political rules. Once mask mandates were becoming state-backed, there were many people who felt that the various rules were not being applied evenhandedly and impacted certain groups more than others. For instance, Walmart and McDonald's could remain open while other similar businesses were forced to shut down or change their business model. This lead to a popular suspicion that the laws were not being used to actually protect the public, but were, in fact, being used to achieve some hidden political agenda.
By itself, that would have only allowed for political dissent, with only the most vaguely perceived Biblical warrant, if any. However, the laws aimed at preventing or restricting social gatherings were viewed by many people within the mentioned political and cultural context mentioned as potentially being a direct attack upon Christian's right and duty to assemble. Many Conservative Evangelical Christians in the US would cite that duty from Hebrews (emphasis mine):
|24 And let us consider one another to provoke unto love and to good works: 25 Not forsaking the assembling of ourselves together, as the manner of some is; but exhorting one another: and so much the more, as ye see the day approaching.
This might seem like a stretch, but consider that because of the distrust and uncertainty, not a few of these people considered masks to be a detriment to good health, and also consider that it had not been common pre-COVID for many of the people in these groups to gather virtually, and even those who do can consider the above command to require physical assembly. Also, if one considers that many of these Christians treat certain assemblies as needing to be free and unrestricted to the public at large, including unbelievers for the purpose of propagating the Gospel, then you can understand why they may not have been willing to enforce such rules.
It may also be of significant note that, in practice, many of these "rules" requiring masks or calling for restrictions were not actually laws. There were cases where these were merely suggestions which were made to look like law, and some were rules which only applied to certain contexts, or were not enforceable for other reasons, and the situation was updating regularly. In practice, I did not personally witness a single congregation break a law. Some did actually wear masks. Some chose not to do so but never had a relevant law apply.
Given the context and understanding of those United States Christians who believed not wearing a mask amid COVID-19, the primary Biblical basis held for civil disobedience was the imperative to preach the Gospel, the command to assemble together, and to some lesser extent, the belief that civil disobedience of this manner would be showing good stewardship of a gift they believed God had given them.