Parshat Terumah states (26:36), “VeAsita Masach LeFetach HaOhel,” “And you shall make a curtain for the entrance of the Ohel.” This entrance to the Mishkan was on the eastern side, and the Kodesh HaKodashim was on the western side. The Rambam in Moreh Nevuchim explains that the focus of the Torah is to get rid of idolatry. The fact that the most holy part of the Mishkan faces west, away from the sun, emerges from this idea.
In ancient times, the sun was idolized as a god more often than anything else. As a result, anyone who entered the Chatzar HaMishkan, courtyard of the Mishkan, faced west, emphasizing that the sun is not a god. It is also interesting to note that the Korban Tamid was offered on the northwest corner of the Mizbei’ach in the morning and on the northeast corner in the afternoon, always facing away from the sun.
The Gemara in Yoma states that Avraham Avinu chose to have the Kodesh HaKodashim built on the western side of the Beit HaMikdash. Rambam suggests that the reason for this was that during the time of Avraham, many people worshipped the sun. By suggesting that the Kodesh HaKodashim be built in the west, Avraham was openly going against the beliefs of others, turning his back to the sun.
Avraham’s decision serves as a strong message for all of us. We must take care to stay far away from any action that could give the impression that we condone any type of Avodah Zarah.