We think of the temple as the house where animals were sacrificed to the Lord, and indeed it was. But the temple was also the house of prayer. When King Salomon had built the first temple he stood before the altar and prayed (1 Kings 8:1–66). In this prayer he asks the Lord to hear the prayers of Israel in the temple, but also the prayers of foreigners: Likewise, when a foreigner, who is not of your people Israel, comes from a far country for your name’s sake (for they shall hear of your great name and your mighty hand, and of your outstretched arm), when he comes and prays toward this house, hear in heaven your dwelling place
(1 Kings 8:41–42). The temple was the place where God dwelled among his people. Until Jesus came; He said that the time was coming it did not matter to pray to God in the temple or elsewhere: But the hour is coming, and is now here, when the true worshipers will worship the Father in the spirit and truth, for the Father is seeking such people to worship him
(John 4:23).
17 And he was teaching them and saying to them, “Is it not written, ‘My house shall be called a house of prayer for all the nations’? But you have made it a den of robbers.”