The operative clause is constrained to interpretations that are consistent with the prefatory clause. "But apart from that clarifying function, a prefatory clause does not limit or expand the scope of the operative clause." DC v Heller 554 U.S. 570 (2008)
The majority in Heller, after interpreting the operative clause "return[ed] to the prefatory clause to ensure that [their] reading of the operative clause is consistent with the announced purpose."
In their case, since their interpretation of the operative clause was consistent with the announced purpose in the prefatory clause, the prefatory clause may seem to have no effect.
However, they make the point that other interpretations of the operative clause can be ruled out by cross-checking against the announced purpose from the prefatory clause: "petitioners’ interpretation does not even achieve the narrower purpose that prompted codification of the right."
The court writes that if the petitioners had their way, only state-organized militias would be the beneficiary of the 2nd Amendment protections. However, the majority does not read the prefatory clause this narrowly. "[If] the organized militia is the sole institutional beneficiary of the Second Amendment’s guarantee — it does not assure the existence of a “citizens’ militia” as a safeguard against tyranny." The majority reads the prefatory clause to refer to a "citizens' militia": "the Militia comprised all males physically capable of acting in concert for the common defense".