To me they seem to be hints at the process of Initiation.
The pillars in the Priestess card are marked with B and J for Boaz and Jachin, which represents esoteric knowledge. The woman guards esoteric knowledge, but also you get a little tease from your unconscious, which already holds the esoteric knowledge. The problem is that walking up to your unconscious and saying "gimme" isn't going to go well....there's a reason the unconscious is hidden, there's some dangerous stuff in there, that's why the veil covers the waters behind the Priestess. We have to go a bit further before we can actually look our unconscious face to face. This card tells you to respect your intuitions as possible messages from your Higher Self, but you must remain wary of the tricks of the unconscious.
By the time we get to the Moon, we've learned a great deal...here we face the unconscious head on. The two pillars are intimidating entrances into the hell that is your unconscious mind. The winding path could take you God knows where and the two dogs remind you that on a basic level...you're just like them, an instinctual creature. Here we're walking into the depths..and if we're not ready fear, anxiety, delusions, and even insanity await. I think that the pillars here serve as a reminder and comparison to the High Priestess, basically letting you know that there's no veil to save you here.
Basically the connection is one of comparison: comparison between controlled and uncontrolled unconscious.