Basically, we don't know. Several suggestions have been given and scholars have studied this for decades, but there is no true agreement. Here is an overview of suggested positions.
This must be Atbash
We have extra-biblical sources that confirm that Atbash and other letter substitution methods were known and "widely practiced in antiquity" (Lieberman, 1962. Hellenism in Jewish Palestine, p. 73). We have three well-known cases in the Hebrew Bible, all in Jeremiah (25:26; 51:1; 51:41) and possibly a fourth in 1 Kings 9:13. However, some have argued that the practice was much more widespread (e.g., Noegel, 1996. "Atbash in Jeremiah and Its Literary Significance: Part 1." in Jewish Bible Quarterly 24, 82–89). The problem with recognising words that do fit in context as Atbash is that it's difficult to tell whether original readers would have recognised it (and then, what signifies the use of Atbash there — although on the other hand, as Noegel mentions (p. 88), Rashi may have understood a case of חמר in Jer 18:2–4 when he calls the passage "an inverted verse").
Indeed, as you say, it is unlikely that the well-known cases are meant to hide the true meaning from the authorities. In Jer 51:41 שׁשׁך and בבל even occur in the same verse (Noegel, p. 83). Noegel also reviews some literature including ideas that "Sheshak was a genuine name for Babylon and need not therefore be understood as a cipher" (Nicholson, 1965. The Book of the Prophet Jeremiah, vol 2., pp. 222–223) and "It is a literary device, possibly insulting or with some other emotional overtones, but possibly, too, used by the Babylonians themselves" (Thompson, 1980. The Book of Jeremiah, p. 749). However, as Noegel notes, these suggestions must be rejected because "in the voluminous Neo-Babylonian materials at one's disposal there is no mention of a שׁשׁך".
A magical interpretation
Noegel himself suggests (p. 83–84, with references):
It is commonly accepted that the ancients, in biblical Israel and in the Near East in general, believed words to be more than an extension of the spoken idea; they possessed the substance and form of that idea. Thus, once spoken, words were capable of affecting the observable reality. [...] Therefore, if we are to understand the purpose of atbash in Jeremiah, we must first consider this ancient mindset. Thus, if words possess power and essence, atbash represents a reversal of that power and essence. As we shall see, atbash typically occurs in contexts in which power struggles take place.
On the other hand, Leuchter (2004. "Jeremiah's 70-Year Prophecy and the שׁשׁך/לב קמי Atbash Codes." Biblica 85, pp. 503–522) disagrees (p. 506):
There can be little doubt that the Jeremianic tradition places far greater emphasis on the power of written prophecy than any of the prophetic traditions from which it drew, but there can [sic] little likelihood that the coding represents a word-magic formula. [...] The Jeremianic tradition consistently inveighs against the hypostatization of systems, icons and ideas within Israelite religious consciousness [...] The application of magical dimensions to the atbash coding in the Jeremianic passages would be inconsistent with the dominant theo-polemical scheme of the text.
Fear of Babylon's name
Leuchter (p. 507) also discusses Steiner (1996. "The Two Sons of Neriah and the Two Editions of Jeremiah in Light of the Two Atbash Code-Words for Babylon", Vetus Testamentum 46, pp. 74–84), who thinks Atbash was originally used to preserve earlier versions of the book of Jeremiah under Babylonian dominion and are then used "as a commentary on communal fear of Babylonian dominance":
Although the popular use of this code-word among the Jews must have been motivated, at least initially, by fear of the Babylonians, its use in Jer li 41, in a prophecy full of undisguised references to Babylonia, would seem to have the opposite motive. In context, it has the effect of the flouting the taboo against anti-Babylonian agitation. The expressions ššk and lb qmy are surrounded by quotation marks in Jeremiah, to be read in a voice dripping with sarcasm. When the prophet wails "How was 'Sheshach' captured?" in a mock lament, he seems to be saying: "Here is what will happen to the power whose very name you fear to utter openly".
As Leuchter (p. 508) notes, this explanation has some difficulties, namely that it seems Atbash was used by a literary elite, not in common speech, and more importantly, that we have no evidence that people were indeed afraid to "utter openly" the name of Babylon.
A reference to a cuneiform inscription
Leuchter himself (pp. 509–510) suggests a connection to an inscription from the reign of Esarhaddon (681–669) which reads in part:
The people who lived there went, appointed to the mob, into slavery. 70 years, the allotment for its abandonment, he wrote, but compassionate Marduk, his heart quickly relented and he turned (it) upside down. He declared its inhabitation in 11 years.
Leuchter writes:
Commencing the building program 11 years after Sennacherib completed his campaign, the inscription establishes the divine ordination of Esarhaddon's efforts, making him the bearer of Marduk's will and presenting the building policy as the restoration of Babylon's sanctity. The manner in which this process is realized is through a literary feature of the inscription itself, with the cuneiform symbol representing the number 70 inverted to appear as the symbol representing the number 11. [...] It is difficult to avoid seeing uncanny similarities between Esarhaddon's inscription and the Jeremianic material under consideration. Both texts deal with a divine decree concerning a 70-year repression, and both texts rely upon scribal methodology to invert the decree. In the case of the Esarhaddon text, the inversion takes place with the cuneiform symbol itself; the atbash code in the Jeremianic text represents an analogous method applied to the Hebrew alphabetic script.
In the remainder of the article, Leuchter makes it plausible that the original readers would have understood the reference.