The reason you don't need to secure your house like a medieval castle is twofold:
(1) We live in nations of laws. The threat of state violence deters most thieves.
(2) You don't actually keep most of your valuables in your home. The stuff the thieves want is (mostly) actually stored somewhere else.
Security work absolutely is productive if it actually prevents theft. Securing your home is the wrong analogy, because it doesn't really prevent meaningful losses. Securing the bank? Different ballgame.