Every time I steal from someone, they are nice to me until I leave and come back. Upon my return, everyone in the settlement is hostile towards me. This happened to me in The Bunker (which caused me to load a backup save which was five hours prior to that point), several settlements, and it just happened to me again in Diamond City. I'll successfully steal an item, everyone will act normal to me, when I leave the area and return, everyone acts as if they just caught me stealing. I've testing this thoroughly in Diamond City and a settlement I hadn't allied myself with yet. Every time I was able to steal at least one item with nobody around, left the area, came back, and everyone started shooting at me.
Hell, one time I was in a house all by myself - nobody else was anywhere near me but the items were red, and when I returned to the trader's post about three hours later (I had been there previously and they weren't hostile), the trader just opened fire on me.