The same problem can be seen on Lost in Space in "The Anti-Matter Man," which was pretty shocking ...
Totally intentional. The anti-matter world was lit and shot in such a way that all of the limitations were made obvious; the ends of the set, the shadows on the walls, the glaringly fake mountains in the distance all shot from a high crane. It was one of the very few times they could shoot on the set and not worry about making sure everything was in the right proportion or angle.
I suspect Spectre of the Gun was shot the same way. With the lack of budget to have full buildings or to shoot on a location, they decision was made to use the bits and pieces to make facades. Since it was an illusion and obviously artificial, this was played up. No film crew of any skill would have shadows of trees against the backdrop that obvious unless it was intentional. And the crews of both Star Trek and Lost in Space were very skilled pros. Irwin Allen only hired hacks when it came to scripts, not his technicians.
But seriously, Zap, you were
kidding about LIS being the gold standard for believable sci-fi. Right?