https://en.wikipedia.org/wiki/Eye_of_Providence
And the “pyramid” is mostly an unfinished building (note the missing top) to emphasize the new nation that is still in the process of being built. (13 layers for the 13 states) It is also meant to look sturdy and point to the top (to god or even to be completed by the god triangle) so the pyramidal form lends itself to that. Next to it, it says "annuit coeptis" or "he favored our undertakings". And the pyramid with the 13 layers each representing a state is a good way to show the undertakings. Sure you could have made it rectangular like a wall, but that might have looked weird.
So, it’s probably just christian symbolism. If they really wanted to reference the eye of Horus or the pyramids of Gizeh they could have easily done that as well by just putting the actual egyptian looking eye of Horus there or an actual complete four sided pyramid.
Btw, the freemasons themselves say they did not have much to do with it:
https://official-freemasonry.com/masonic-symbols-dollar-bill...
It stands for the trinity, in the subdued form of a triangle. If it wasn't for a hundred years of religious war in Europe, the symbol might have looked like this: https://en.wikipedia.org/wiki/The_Trinity_in_art#/media/File...