Rashi, commenting on Exodus 12:22 “and you shall not go out…” states,
This tells [us] that once the destroyer is given permission to destroy, he does not discriminate between righteous and wicked. And night is the time that destroyers are given permission, as it is said: “in which every beast of the forest moves about” (Ps. 104:20). — [from Mechilta]
The past year things have caused my wife and I to question, or wonder, about G~d’s protection and how He chooses to shelter His people. I’ve personally concluded that for things to be fair all men have to be subject to chance and luck, if you will. This is why sometimes the wicked prosper and the righteous suffer—all are subject to an imperfect world with imperfect rules in place.
Looking at this commentary it reinforces this idea, but also adds that sometimes G~d Himself puts forces into action that are unstoppable. Since the passage goes on to state that Moses and Aaron themselves obeyed the commandment they gave to others (vs 28) it is apparent that they were also subject to G~d’s protection through the Pesach offering, and their households equally subject to the order of death if the commandment wasn’t fulfilled.
While it’s not fair on an individual level, to be fair to all G~d must have all people (at least at times) subject to the same laws—whether natural or moral.