See that is the attitude that has our society so screwed up. Never blame the wrong doer, blame someone else.
There is no law on the books that says breaking and entering (trespassing) is a crime provided the doors are locked, if the doors aren't locked...it's OK to go in. Same with any of the examples you gave, it's not OK. Blame resides on the wrong doer, it's that simple, it's black and white, there are no shades of gray in this (or any of your examples) instance.
Jeremy, forgive me for going off topic, but I think this post deserves a response. Below is the law of breaking and entering in the state of Ohio. I cannot speak for other jurisdictions.
O.R.C. Section 2911.13 Breaking and entering:
(A) No person by force, stealth, or deception, shall trespass in an unoccupied structure, with purpose to commit therein any theft offense, as defined in section 2913.01 of the Revised Code, or any felony.
(B) No person shall trespass on the land or premises of another, with purpose to commit a felony.
(C) Whoever violates this section is guilty of breaking and entering, a felony of the fifth degree.
"Stealth" has been construed to mean sneaking into a structure, whether the structure is locked or unlocked; door open or shut. There actually is a law..."on the books."