Burglary is instructive. It does not follow that once the offense itself has been initiated, that is, the perpetrator has entered the structure with the requisite intent, an individual who, with knowledge of the perpetrator's unlawful purpose, thereafter forms the intent to commit, facilitate, or encourage commission of the offense by the perpetrator while the perpetrator still remains inside the structure, is not liable as an aider and abettor. In People v. Gauze (1975) 15 Cal.3d 709, 714 [125 Cal.Rptr. 773, 542 P.2d 1365], while observing that a burglary consists of 'an entry which invades a possessory right in a building,' the court had occasion to review the broad underlying basis for the criminal sanction against the particular act and intent constituting burglary.
Therein, is the rationale set forth in People v. Lewis (1969) 274 Cal.App.2d 912, 920 [79 Cal.Rptr. 650]: ' 'Burglary laws are based primarily upon a recognition of the dangers to personal safety created by the usual burglary situation--the danger that the intruder will harm the occupants in attempting to perpetrate the intended crime or to escape and the danger that the occupants will in anger or panic react violently to the ...