Batman doesn't merely follow the law. He does what he believes is necessary to provide safety for the city. Legally, Batman would never be able to inflict such physical pain on individuals who were savage in the community. It basically breaks into windows etc. which is essentially breaking and entering or damaging someone's property.