I don’t think its about trespassing because its public parking. I think it is because the sidewalk ends directly on one parking spot. Maybe it would have been required to remove the parking spot to create a opening. There is also a Bus stop beside the sidewalk so maybe they just wanted to have less foot traffic on the parking area. But they must have known that the fence is not big enough…
It would be funny if the wall would have been just a very long fence with kein Durchgang signs all over it and the people just obeyed the signs.