My middle school got bitten by this. The roof collapsed on a burglar and he successfully sued the school. At the time he was not doing anything illegal (as he was outside a public school). The roof was unsafe and we have laws against that to protect HVAC technicians and the like.
That he was up to no good was irrelevant.