This same idea is repeated numerous times in the Bible and is primarily exemplified in the OT tabernacle and temple. Here is a sample:
- Ex 6:3 - I appeared to Abraham, to Isaac and to Jacob as God Almighty, but by my name the LORD I did not make myself fully known to them.
- Ex 34:4-7 - And the LORD descended in a cloud, stood with him there, and proclaimed His name, the LORD. Then the LORD passed in front of Moses and called out: “The LORD, the LORD God, is compassionate and gracious, slow to anger, abounding in loving devotion and faithfulness, maintaining loving devotion to a thousand generations, a forgiving iniquity, transgression, and sin. Yet He will by no means excuse the guilty; He will visit the iniquity of the fathers on their children and grandchildren to the third and fourth generations.
- Lev 19:12 - Do not swear falsely by my name and so profane the name of your God. I am the LORD. [This is repeated many times in Leviticus when various laws were spoken and in many cases the reason given is always the same - "I am the LORD".]
- 1 Sam 12:22 - For the sake of his great name the LORD will not reject his people, because the LORD was pleased to make you his own.
- 1 Kings 5:5 - I intend, therefore, to build a temple for the Name of the LORD my God, as the LORD told my father David, when he said, 'Your son whom I will put on the throne in your place will build the temple for my Name.
- Ps 118:26 - Blessed is he who comes in the name of the LORD. From the house of the LORD we bless you. [See also Matt 21:9, 23:29, Mark 11:9, Luke 13:35, 19:35, John 12:13]
- Eze 20:44 - You will know that I am the LORD, when I deal with you for my name's sake and not according to your evil ways and your corrupt practices, you people of Israel, declares the Sovereign LORD.
- Jer 7:11 - Has this house, which bears my Name, become a den of robbers to you? But I have been watching! declares the LORD.
- 2 Chron 7:14 - if my people, who are called by my name, will humble themselves and pray and seek my face and turn from their wicked ways, then I will hear from heaven, and I will forgive their sin and will heal their land. See also Isa 56:5.
- Zech 10:12 - "I will strengthen them in the LORD and in his name they will live securely," declares the LORD.
- Micah 4:5 - All the nations may walk in the name of their gods, but we will walk in the name of the LORD our God for ever and ever. [This is a direct reference to the Messiah to be born in Bethlehem.]
It is immediately apparent that the Jerusalem temple was to represent the "Name of the LORD", as were God's people, the prophets, their messages, he land, and much else. Thus, the name of the LORD, not the syllables, was sacred as it represented His character, mercy, salvation, power and glory. The people, the temple and their way of living was supposed to represent all this.
This is also repeated in is some famous events such as the queen of Sheba's reaction to the way Solomon ascended to the house of the LORD (2 Chron 9:4) and his throne that represented the Lord (v8). When David was rebuked by Nathan (2 Sam 12), David's great sin was more than just adultery and murder, the primary problem was that his actions caused the pagan nations to blaspheme the Name of the LORD (v14). Belshazzar's great sin was to set himself against the LORD (Dan 5:23).
Lord Messiah was the ultimate representation of the Character and Name of the LORD. This was part of the dispute He had with the Jews when he said that someone greater than the temple, Matt 12:6, Hag 2:9 (see also 2 Chron 2:5).
The opposite is also true - that worshiping worthless gods makes people worthless, see 2 Kings 17:15, Jer 2:5, 8, Rom 1:20-22, 3:12, etc.
The passage in Jeremiah in the OP is part of a series of rebukes which can be summarised in the Jer 7:3-7 -
Thus says the LORD of Hosts, the God of Israel: Correct your ways and
your deeds, and I will allow you to live in this place. Do not trust
in deceptive words, chanting, “This is the temple of the LORD, the
temple of the LORD, the temple of the LORD.” For if you really change
your ways and deeds, if you act justly toward one another, if you no
longer oppress the foreigner and the fatherless and the widow, and no
longer shed innocent blood in this place or follow other gods to your
own harm, then I will allow you to live in this place, in the land I
gave to your fathers forever and ever.
Thus, Jeremiah rebuked the people because they mistakenly believed that having the "Temple of the LORD" made then invincible. They were mistaken precisely because they failed to live by the Name of the LORD, specifically, reflect the LORD's character by living in a righteous way.