Bower (1972), for example, showed that short-term associative memory could be dramatically improved by imagining a unique scene involving the two items to be associated [1]. E.g. to remember DOG-BICYCLE (so that when you hear DOG you recall BICYCLE or vice versa) you imagine a dog riding a bicycle, or in this article to remember STEAK-PORCH you imagine a cow sitting on your porch. Since these will be very unique to each pair, you won't accidentally end up associating STEAK-BICYCLE or DOG-PORCH during recall.
In this light, the utility of the "palace" is simply that it's an extremely familiar ordered sequence or layout of items (e.g. PORCH, STAIRS, KITCHEN, BEDROOM, etc), not that it is fundamentally a 2D/3D spatial structure. In CS lingo, this sequence/layout would act as a fixed, ordered set of "keys" for recalling key-value pairs that you stored via the imagery process. For instance, if one used another familiar sequence, say the first scenes of your favorite movie you've seen a hundred times, you could creatively put the items in your grocery list into those scenes and then recall them by recalling the scenes in order and remembering what grocery item you put in each one.
Thus, I think there's a sense in which it's not 2D/3D space that's fundamental to better recall, but rather a familiar topologically organized layout of items/locations/scenes that you can use as the keys to bind new items to in the short-term via visualization.
[1] https://www.researchgate.net/publication/232506583_Mental_im...