Dura lex sed lex

I was chased away while taking this picture as it occurred that it is prohibited to stay there if I don’t live in the apartments. In addition to this, the area is not fenced. The only things I could see were red tables with the mentioned information. What do you think about such rules?