I don't know if you live in California, but "permits" are the go to weapon of neighborhood activist groups to try to get what they want. Whether it is to prevent building, property use, or nuisances. My guess is that someone argued the container is a "building" (it has windows and a door after all), and every city requires that you get a permit before you put a building on your property. Whether it is a lowly garden shed or a guest house.
Should neighbors be able to attack each other with the municipal code? That is a pretty deep question. Do they? Sure all the time.
Some negative effects are wrongful, but far from all.
This was told to me by a US police officer who came in to talk to us about getting ready to drive. He said going to the mall or a football stadium on a Sunday is the perfect way to get practice. It just needed to be private property.
Edit: To clarify this happened a few years ago when I was still in high school.
[0] - http://image.syracuse.com/home/syr-media/width620/img/weathe...