One of the problems with only knowing the black letter law of the statute is that the courts may have interpreted that statute in a way that is not obvious through cases applying the statute to specific case facts. Then there is as Jeff White says, the politics and personnel enforcing the law in the area of the incident. And at last, civil liability also lurks out there as an additional danger.
The statutes themselves are often a mish mash of laws, sometimes with apparent contradictions, that have been passed over a century or so. So courts do not normally read a statute in isolation from other statutes that apply to the general situation but try the reconcile any ambiguities and contradictions that occur over time through interpretations of the laws in specific cases.
If they are available in your state, pattern jury instructions regarding crimes etc. are often a valuable resource in determining how laws are to be applied by a jury. Juries do not get caselaw precedent to take back into the jury room but instead are instructed by the judge as to what the laws of the state are to apply to the facts in the case before them. In some states, judicial officials have created std. jury instructions on specific areas of the law, in other states, the judge, prosecutor, and defense come up with these ad hoc during the trial process.
Here is an example from Florida
https://jury.flcourts.org/criminal-jury-instructions-home/criminal-jury-instructions/
California
https://www.courts.ca.gov/partners/documents/calcrim_2019_supp.pdf
and Arizona
https://www.azbar.org/media/1978660/2019rajicriminal-5thed.pdf The burglary statutes are covered on pages 207-215.
(Arizona's appear to be well done including citations to specific cases but is published by the state Bar rather than judicial authorities which means that they are a starting place for jury instructions in a particular trial).
Here is an example of the supporting caselaw that affects interpretation of whether or not a 1st degree burglary occurred under AZ law.
"In State v. Eastlack, 180 Ariz. 243, 257, 883 P.2d 999, 1013 (1994), cert. denied,
514 U.S. 118 (1995), the court held that a weapon or dangerous instrument obtained by a
burglar during the burglary and held as “loot” does not by itself render the burglar “armed”
within the meaning of the first degree burglary statute. That holding was based on the
wording of the statute that required the state to prove that the defendant be “armed with . . .
a deadly weapon.” The statute was amended in 1988. The amendment replaced the “armed
with” requirement with “knowingly possess.” Accordingly, a weapon or dangerous
instrument obtained by a burglar during the burglary and held as “loot” can support a
conviction for first-degree burglary. State v. Tabor, 184 Ariz. 119, 907 P.2d 505 (App. 1995).
Possession of a dangerous instrument while remaining in the house where murder was
committed justified armed burglary instruction, even if defendant did not possess dangerous
instrument when entering or leaving the house. State v. Salazar, 173 Ariz. 399, 409, 844 P.2d
566, 576, cert. denied, 509 U.S. 912 (1992)."
AZ Self defense jury instructions are on pages 59-61 (the link is a pdf and the pdf page numbers do not match the page number on the printed page). A bit too long to cut and paste here but it cites relevant case law that applies to self defense so you can look up what the court said in those cases.