The roof of a house is its highest point, and the part most exposed to the sun. So it makes sense that in the Bible, according to Swedenborg, “roof” represents what is inmost in a person – the part that is closest and most in contact with the Lord.
Swedenborg also notes that this inmost part is, in everyone, a love or affection rather than a truth or idea. This makes sense if you think about it: Even the greatest thinkers are driven by a love of ideas – our character is ultimately a matter of what we care about, not what we think.
Following this, then, “roof” represents our most deeply felt affection for what is good and true.
Passages from Swedenborg
Arcana Coelestia (Elliott) n. 3652
[6] Let him who is on the roof of the house not go down to take anything out of his house means that those in whom the good of charity is present should not therefore resort to matters of doctrine concerning faith. ‘The roof of the house’ in the Word means a person’s higher state, and so his state as regards good, whereas what is below means a person’s lower state, and so his state as regards truth. For what ‘house’ is, see 710, 1708, 2233, 2331, 3142, 3538. With regard to the state of a member of the Church, while he is undergoing regeneration he is at that time learning truth for the sake of good; for he possesses an affection for truth for the sake of that good. But once he has been regenerated truth and good are the basis of his actions. Once he has reached this state he ought not to go back to the previous state, for if he did he would then reason from truth about the good which is present with him and in so doing would pervert his present state. For all reasoning does and must come to an end when a person’s state is one in which he wills what is true and good, for in that case the will and therefore conscience are the source of his thought and action, and not the understanding, as it had been previously. If he went back to the understanding as the source of his thought and action he would encounter temptations in which he would go under. These are the considerations meant by the statement ‘let him who is on the roof of the house not go down to take anything out of his house’.
Arcana Coelestia (Elliott) n. 10184
10184. ‘Its roof’ means what is inmost. This is clear from the meaning of ‘the roof’ as what is inmost. One reason why ‘the roof’ has this meaning is that it is the uppermost or highest part, and that which is uppermost or highest means what is inmost, in accord with what has been shown above in 10181; and another reason is that ‘the roof’ has the same meaning as the head on a person’s body. For all representatives on the natural level resemble the human form and carry the same meaning as the parts of it they resemble, 9496. For the meaning of ‘the head’ as what is inmost, see 5328, 6436, 7859, 9656, 9913, 9914. What is inmost meant here by ‘the roof of the altar of incense’ is the inmost component of worship. Within worship there are levels similar to those within the person offering it, namely an inmost level, a middle level, and an outward level. The inmost is called celestial, the middle is called spiritual, and the outward is called natural, 4938, 4939, 9992, 10005, 10017, 10068. These degrees are by virtue of correspondence meant by the head, breast, and feet, and in like manner by the roof, walls, and horns of the altar of incense.
[2] Since ‘the roof’ means that which is celestial, which is what is inmost, it also means good, for in all places good is inmost, while truth emanates from it just as, to use a comparison, light does from a flame. This is what should be understood by ‘the roof’ in Matthew,
Then let him who is on the roof of the house not go down to take anything out of his house. Matt. 24:17; Mark 13:15; Luke 17:31.
This refers to the last times of the Church. ‘Being on the roof’ means the state of a person in whom good is present, and ‘going down to take anything out of the house’ means going back to a previous state, see 3652 and the places referred to in 9274. And in Jeremiah,
On all the roofs of Moab and in its streets there is mourning everywhere. Jer. 48:38.
‘Mourning on all roofs’ means the ruination of all forms of good among those meant in the representative sense by Moab, that is, those in whom natural good is present, who easily allow themselves to be led astray, 2468; and ‘mourning in the streets’ means the ruination of all truths, truths being meant by ‘streets’, see 2336.
[3] Since ‘the roof’ meant good the houses of the ancients had roofs on which they used to walk and on which they also used to worship, as becomes clear from 1 Sam. 9:25, 26; 2 Sam. 11:2; Zeph. 1:5. In Moses,
When you build a new house you shall make a parapet for your roof, that you may not bring blood* on your house if someone falls from it. You shall not sow your vineyard with mixed seed, lest the yield from the seed which you have sown and from the produce of your vineyard be forfeited**. You shall not plough with an ox and an ass together. You shall not wear a garment made of wool and flax mixed together***. Deut. 22:8-11.
[4] From these quotations it is again evident that ‘the roof’ means the good of love, for the commands in them each embody similar meanings which only the internal sense can make evident. That is, they mean that one who is governed by good, which is the state of a person who has been regenerated, must not return to the state of truth, which was that person’s previous state, or his state when being regenerated. During this state the person is led by means of truth towards good, that is, partly from self; but in the state which comes after it, that is to say, when the person has been regenerated, he is led by good, that is, by the Lord by means of good.
[5] This is the arcanum that lies within each of those commands, and so is akin to that which occurs in the Lord’s words in Matthew,
Then let him who is on the housetop not come down to take anything out of his house; and let him who is in the field not turn back to take his clothes. Matt. 24:17, 18.
In Mark,
Let him who is on the roof not go down into the house, nor go in to fetch anything out of his house. And let him who is in the field not turn back again to fetch his garment. Mark 13:15, 16.
And in Luke,
On that day, whoever will be on the housetop with his vessels in the house, let him not come down to take them away; and whoever is in the field, let him likewise not return to the things behind him. Remember Lot’s wife. Luke 17:31, 32.
[6] Who can fail to see that these places contain the arcana of heaven? For if they did not contain them, what point would there be to telling people not to come down from the housetop, not to turn back from the field and return to their house, and to remember Lot’s wife? Such arcana are in like manner contained in those laws in Moses which declare that they should make a parapet around their roof, so that there would be no blood* if they fell, and immediately after that the field should not be sown with a mixture of seed and the produce of the vineyard, that it should not be ploughed with an ox and an ass together, and that they should not wear a garment made of wool and flax mixed together. ‘The roof’ means good, and ‘to be on the housetop’ or on the roof means a person’s state when that person is governed by good. ‘Falling’ from the roof means sinking back into the previous state, while ‘blood’ means the violence done then to goodness and truth, 374, 1005, 4735, 6978, 7317, 7326. ‘The vineyard’ means the Church among mankind; ‘the produce of the vineyard’ means the state of truth, 9139; and ‘the seed’ of wheat or barley means the state of good, 3941, 7605. ‘An ox’ also means good, and ‘ploughing with an ox’ the state of good, 2781, 9135; and ‘wool’ and ‘wearing a garment made of wool’ have the same meanings, 9470. ‘An ass’ means truth, 2781, 5741, and so too does ‘flax’ or ‘linen’, 7601, 9959. But for anything more about the nature of this arcanum, see the explanations in the places referred to in 9274.
Apocalypse Explained (Tansley) n. 405
[34] In the Evangelists:
“When ye shall see the abomination of desolation, spoken of by Daniel the prophet, then let him that is in Judea flee to the mountains; and let him that is on the roof not go down into the house” (Mark xiii. 14, 15; Matt. xxiv. 16; Luke xxi. 21).
In those chapters is described the successive vastation of the church by the Lord, but it is described by pure correspondences. “When ye shall see the abomination of desolation,” signifies, when the disciples, that is, those who are in truths from good, perceive the church to be devastated, which takes place when there is no longer any truth because there is no good, or no faith because no charity. “Then let him that is in Judea flee to the mountains,” signifies that those who are of the Lord’s church should remain in the good of love; Judea signifying the Lord’s church; and mountains, the goods of love; to flee to them denoting to remain therein. “Let him that is on the roof not go down into the house,” signifies that he who is in genuine truths should abide therein, a house signifying the man as to all interior things of his mind, and hence the roof signifies intelligence from genuine truths, thus also the genuine truths by which intelligence [is formed in man].