The Beis Hamikdash is called תלפיות as found in the passuk (Shir Hashirim 4,4) כמגדל דוד צאורך בנוי לתלפיות Your neck is compared to a tower well built. The Migdal David is referring to the Beis Hamikdash. Chazal interpret the word תלפיות by splitting the word into two – תל פיות a "heap of mouths" that all mouths turn to it to daven. The meforshim explain this to mean that when we daven we turn our bodies to the direction of Yerushalayim and the Kodesh Hakadashim. The reason being is that the place of the Beis Hamikdash is called by the Torah שער שמים the gateway to heaven and all of Yisrael's tefillos ascend heavenwards from there.
From this interpretation it appears that we turn towards the Beis Hamikdash when we daven in order that our tefillos will be accepted by Hashem. However the Mabit in his sefer Beis Elokim writes in perek 5
זהו רק להיכר שיראה בתפלתו כאלו מדבר עם השכינה ולכן צריך להפוך פניו אל מקומה וז"ל ענין היות התפלה נוכח ארץ ישראל וירושלים ובית המקדש הוא דבר עיקרי לתפלה וכמו שלמדו מפסוקי תפלת שלמה וכו' כי בהיות ארץ ישראל ירושלים ובית המקדש מוכנים לקבלת התפלה כמו שאמרתי צריך האדם להתפלל נכחם להכיר ולרמוז שהוא מתפלל לאל יתברך השוכן במקומות המוכנים האלו כי המתפלל בתפלתו מדבר לנוכח כאלו מדבר עם השכינה ולזה צריך להפוך פניו אל מקומה כי מעולם לא זזה שכינה מכותל המערבי עכ"ל
The purpose of facing Yerushalayim and the Beis Hamikdash when we daven is more of a reminder to us that when we daven we are actually addressing and talking to the Shechinah which still resides in these places. A similar thought is brought by the Mareh Panim in his commentary on Yerushalmi Berachos perek 4 that by facing the direction of the Beis Hamikdash one will be reminded to daven for the geulah and its being rebuilt to its former glory.
Another purpose for this ritual is to bring about achdus in Am Yisrael as seems apparent from the very source of Chazal explaining the name Talpiyos (Berachos 30)
נמצא עומד במזרח מחזיר פניו למערב במערב מחזיר פניו למזרח בדרום מחזיר פניו לצפון בצפון מחזיר פניו לדרום נמצאו כל ישראל מכוונים את לבם למקום אחד מאי קראה כמגדל דוד צוארך בנוי לתלפיות תל שכל פיות פונים בו. This theme of making a conscious achdus amongst all of Klal Yisrael three times a day at least in their hearts, is supported by the reason given by the Chreidim in the introduction of his sefer. He writes that by facing towards Yerushalayim when we daven it reminds us of our former love relationship that we had with Hashem.
ויחל משה פניו יתברך ויאמר לו סלחתי כדבריך ולראיה כי מחל להם מחילה גמורה ואהבתו הגדולה לא זזה ממקומה עשאם דגלים איש על דגלו בארבע רוחות ושכינתו ביניהם משכן מלא מאור נוגה דוגמת מחנה מלאכיו מיכאל גבריאל רפאל נוריאל והוא באמצען וכו' להורות כי הוא אלוקינו אבינו ואנחנו עמו ועבדיו בניו כשתילי זיתים סביב לשלחנו וכו' ובכניסתם לארץ וכו' המליך עלינו מלך וכו' ובנה מקדש לאלוקינו בירושלים שהוא באמצע ארץ ישראל ועמו ישראל בארבע רוחותיו בארץ ישראל כדגלים במדבר כשתילי זיתים סביב לשלחנו וכי פשעו בו היה שולח להם עבדיו הנביאים השכם והערב להתרות בנו שנשוב ולא שמענו וכי נתמלאת סאת פשעינו הרס בעברתו המקדש וזרה אותנו בארבע כנפות הארץ סביבות ירושלים מרחוק
The proof that Hashem forgave Yisrael for the chait of the Aigel was from the structure of their encampment in the Desert. The Mishkan was in the middle surrounded by the four groups of three Shevatim each with their own Flags. The Shechinah dwelled with them in the middle and we were compared to children sitting by our father's table comparable to the heavenly encampment of מיכאל גבריאל רפאל נוריאל with the Shechina in the center. When we entered Eretz Yisrael Hashem set up for us a king who built a Mikdash for Hashem in Yerushalayim which is geographically situated in the middle of Eretz Yisrael making all of its inhabitants to surround the Shechina just as it was in the Mishkan with the flags. When we strayed away from Hashem's wishes He sent us prophets to arouse us to do teshuvah and we refused to change our ways. He then destroyed Yerushalayim and the Beis Hamikdash and dispersed us to the four corners of the earth. Now in contrast, we find ourselves in four directions surrounding from a distance, an empty and desolate location of a destroyed Beis Hamikdash lacking the revelation of Hashem's Shechinah.
The Sefer Chareidim is telling us that this ritual of facing Yerushalayim when we daven is in order to arouse our yearning to return to the Degalim encampment which we experienced in the desert, where we found Hashem's forgiveness, love, and embrace to us even after we have sinned terribly towards Him a"k.
With the above two last explanations we can understand why the Beis Hamikdash and Yerushalayim are called תל פיות and not because we are dealing with a state of destruction like a heap of rubble, a churban. By picturing it thus we can stir our hearts to yearn for its rebuilding and the return of the Degalim Encampment around Hashem's presence.
According to the Chareidim we can understand another simultaneous ritual at the beginning of the Shemoneh Esrai by which we take three steps forwards. The three steps corresponds to the three dwelling places of Hashem in the form of degalim, the Mishkan and the two Beis Hamidashos which were destroyed. The forward steps symbolize that throughout our davening we look "forwards" to have it rebuilt once again. We introduce the Shemoneh Esrai with the passuk אדנ' שפתי תפתח ופי יגיד תהלתך. The word פי alludes to this theme as it is gematriah with its two letter to .הדגלים
As we mentioned above the Beis Hamikdash is called a מגדל a tower. How tall does it have to be in order to fit the criteria to be called a מגדל from the lashon of .גדול We suggest another interpretation that in the word גדל are the letters of .דגל We see from Chazal (Bamidbar Rabba 2.3) that they change these letters around to form another word דלג "to skip over" as in the passuk דגלו עלי אהבה. So too we can say that גדל is from the root of דגל flag. This shows that the definition of greatness is to return to the דגלים of the Desert with Hashem in the lives. Our Shemoneh Esari is the experience of a deep desire to leave the galus by yearning the dream to have only Hashem as the fiber and center of our daily living. This form of encampment is our greatness and that is why the Mikdash is called מגדל greatness through דגלים. Furthermore this status is the real state and essence of עונג שבת, the combination of the ultimate space, ultimate time, and ultimate nefesh the neshama yesairah. For by spelling מגדל with its inner letters מם גימל דלית למיד we come to בשבת.
We suggest another interpretation akin to the previous one to explain the usage of the word תל instead הר. The gematria of תל is 430 corresponding to the 430 years that Yisrael were in galus from the Bris Bein Habasarim (Shmos 12,11). The sefarim tell us that Mitzrayim was the root galus of the other four בבל פרס יון אדום. The reality that we were redeemed from Mitzrayim withstanding that we were then in a low spiritual state, demonstrates that no matter how long and how bad is our final galus Hashem will still redeem us from it and bring back the Degalim encampment. Sefer Shmos is the sefer of the geulah and yet at the end of the sefer we have four parshiyos that deal with the Mishkan. The Ramban writes that the reason for this is to state absolutely clearly that geulah is nothing less than the resting of the Shechina in Am Yisrael as it was during the Mishkan. We know very well that the Third is on its way.
In short, before we daven the Shemoneh Esrai we must possess prepare ourselves with the yearning for the rebuilding of the Mikdash in the form that Hashem alone will be the heartbeat and mind set of every Yid. To arouse this consciousness, we physically face the Beis Hamikdash, take three steps forward, and say the word פי. When this happens we create a super unity in Am Yisrael where all hearts are connected together, and the focus is away from oneself but rather towards Hashem and another Yid. It is the spirit of Shabbos .אתה אחד ושמך אחד ומי כעמך ישראל גוי אחד בארץ