Have you ever been called "square" because you followed the rules? People call others "square" when they think they are not liberal enough. Actually, this is a very scientific description. Space may be boundless but a square is a geometrical figure that encloses and constrains within a limited area or region of space. A square also consists of four right angles; it is righteous in all directions. Those who prefer to obey the rules of universal order are righteous or just. Those who choose to transgress them are not righteous. While those who choose to make up and obey their own rules are self-righteous.
The question is: does the universe have universal rules of order or can we intend, think, believe, say and do whatever we please? Well, let us start with human society first. We know that any civilized nation has laws. We are free to act and interact in society as long as we do not infringe upon the liberty of others. Thus, there are laws regarding theft, assault, rape and murder. We must obey these laws or limitations or be arrested and imprisoned. What about the physical world itself? We can freely move, manipulate and use all that is material but we are limited and constrained by physical laws. We cannot move through a wall for instance. We can equally utilize fire to transform and produce new useful substances and chemical reactions but, if we misuse and abuse it, we can just as readily cause destruction.
Finally, what about the mental, emotional and spiritual worlds? Do they have walls, laws and constraints or can we intend, think and believe whatever we please? It certainly seems that we are free to love, intend, think and believe whatever we desire? These are our God-given rights to love and reason freely. Hence, many people have no use for the Bible or the Ten Commandments and they call those who obey these spiritual laws "square." Moreover, they do not hesitate to foolishly disobey these laws believing that the quality of their loves, intentions, beliefs, words and actions will have no consequences as long as they do not commit punishable crimes in society.
However, if the universe is consistent on all levels, the spiritual world, like the physical world and human society, should also be permeated with Freedom and governed by spiritual laws of Divine Order. In fact, Freedom in the whole universe is derived from God's Love and order from His Wisdom. And, like in the physical world and human society, if we transgress these spiritual laws, we may destroy or condemn our soul or be imprisoned outside of God’s spiritual society or Heaven.
The New Jerusalem "lieth foursquare" because a square represents Justice, Truth and Righteousness. Yes, this city has walls or constraints like a square. But these sturdy walls which surround the City of God are the Truths and spiritual laws of the Word that protect us from the disorder of falsity, evil and selfishness. Within these walls we are free to live in faith, righteousness, love and harmony and we never again have to worry and fear that we will ever be attacked by false thoughts and evil lusts.
And the name of the city of My God, the New Jerusalem, which is coming down out of heaven from My God, signifies the doctrine of the new church, which is in the heavens. This is evident from the signification of "the city of My God," as being the doctrine of Divine truth; also from the signification of "the New Jerusalem," as being the church in respect to doctrine; also from the signification of "which cometh down out of heaven from My God," as being that it is out of heaven from Divine truth there. That "God" means in the Word Divine truth, see above (n. 220, 222). And as Divine truth, which is in heaven and which comes down from heaven, is from the Lord alone, the Lord calls it His God. That "the city of My God" signifies the doctrine of Divine truth seems at first view remote, for the mind cannot readily think of doctrine when "city" is mentioned, or think of the church when a "land" is mentioned; yet in the Word, "cities" mean nothing else in the spiritual sense; and for the reason that the idea of a city is merely natural, but the idea of doctrine in a city is spiritual. Angels, because they are spiritual, can have no other idea of a city than of the people therein in respect to doctrine, as they can have no other idea of a land than of the people therein in respect to their church or their religion. The reason of this is that the societies into which the heavens are divided are for the most part like cities [communities], all differing from one another in respect to the reception of Divine truth in good; when, therefore, a "city" is mentioned angels think of the doctrine of truth. Emanuel Swedenborg [AE 223]
And the city lieth foursquare, signifies justice in it. The reason why the city was seen "foursquare" is because "a quadrangle" or "a square" signifies what is just, for "a [right-angled] triangle" signifies what is right, all these in the ultimate degree, or the natural. "A quadrangle" or "a square" signifies what is just because it has four sides, and the four sides look towards the four quarters, and to look equally towards the four quarters, is to respect all things from justice; for which reason three gates opened into the city from each quarter, and it is said in Isaiah:
Open ye the gates, that a just nation which keepeth faithfulness may enter in (Isa. 26:2).
"The city lieth foursquare" that the length and breadth thereof might be equal, and by "length" is signified the good of that church, and by "breadth" its truth, and when good and truth are equal, then there is what is just. It is owing to this signification of "a square," that in common discourse a man is said to be "square," who is a man that does not from injustice incline either to this or that party. Because "foursquare" signifies what is just, therefore, the altar of burnt-offering, by which was signified worship from good and thence from celestial truth, was "foursquare" (Exod. 27:1); also the altar of incense, by which was signified worship from good and thence from spiritual truth, was likewise "foursquare" (Exod. 30:1, 2). And also, the breastplate of judgment, in which was the Urim and Thummim, was "foursquare" doubled (Exod. 28:15, 16; 39:9); besides other passages. Emanuel Swedenborg [AR 905]