Raiding villages is a crime. Iron golems and guard villagers will engage when blocks are broken or chests opened nearby.