Although the prominence of long lists in the court tales of Daniel is often noted by commentators, I am aware of only one study devoted to understanding their use in the book, and their relation to literary conventions in the ancient Near East: Peter W. Coxon, "The 'List' Genre and Narrative Style in the Court Tales of Daniel", Journal for the Study of the Old Testament 11.35 (1986): 95-121.
As will become apparent below, following Coxon's analysis, the "purpose" of these lists varies according their immediate context and rhetorical intent in the book. They associate Daniel with broader "wisdom" traditions in the ancient Near East, and reinforce the narrative structuring of the "tales". Among other things, they also contribute to characterization (when used in "pompous" speeches), and can emphasize "ritual" associations (e.g., with the musical instruments).
Coxon's article is very rich, and needs to be consulted for detail. It seems mostly to have been overlooked by later commentators, which is a shame as it offers an illuminating treatment of this key feature of the book of Daniel. What follows is a brief summary of his article, re-organized for readers of this Q&A.
Lists in Daniel
OP identifies a few lists in Daniel 3 that prompted the question. Here are some more, by category (following Coxon; all references are to the book of Daniel). They vary in length, some repeated verbatim, sometimes small variations (these all discussed by Coxon).
N.b. Versification can differ between Hebrew Bible and English versions; I have tried to ensure references below are correct for English versions.
A. Secular Officials
- 3:3 (= 3:2)
- 6:3, 4, 6
B. Cultic Personnel
C. Musical Instruments
- 3:5 repeated in 3:7, 10, 15
D. Metals, etc.
E. Items of Clothing
F. King's Entourage
- 3:7; 4:1
Coxon also draws attention to "the tendency to produce tripartite lists of words and phrases, often repeated with slight variations" (p. 106), but I'll pass over these here. He also devotes a section to "rhetorical repetition", which is related to but different from the "lists" noted above (and of main interest to OP). By way of illustration, note Coxon's first two examples (p. 108):
Some of these are very striking, and Coxon adds to them other sorts of repetition: for ironic effect, and repetition/variation across longer sentence units.
So it's quite clear, then, that this feature is a prominent part of Daniel's literary art and craft. Where does it come from?
Ancient Near Eastern List genre
Coxon notes and describes the use of "lists" in Egyptian and Babylonian literature. These come, for example, in the lists of plants and animals in Egyptian "Wisdom" texts (e.g., the "Instructions of Amenemope", c. 12 C. BC). Or, more extensively, there are the Babylonian lists, well exemplified by the "ḪAR-ra = ḫubullu" text. These have usually been understood as a kind of "ordering science", a bit like the work of an ancient "Linnean Society" devoted to a taxonomy of the natural world. (One well-known, older study investigating these connections is Gerhard von Rad's "Job xxxviii and Ancient Egyptian Widsom", part of his collection The Problem of the Hexateuch and Other Essays, republished in various places.)
Coxon combines his discussion of the various kinds of repetition in Daniel (with pride of place going to the kind of lists noted by OP) with this wider ANE "list science". He demonstrates nicely the embeddedness of the author of the tales of Daniel in these literary traditions, and how the use of lists and repetitions serves the ends of the author, while locating the book (or at least the tales) very much in a "wisdom" context. So he writes on p. 97:
Daniel held an important official post in the Babylonian administration and functioned at court in a manner similar to that of Ahikar the Assyrian wise man and scribe. The court tales themselves extol the virtues of education and the advancement that comes to the diligent young civil servant who actively fulfils the paradigms set out in the old wisdom tradition of the book of Proverbs.
Coxon offers this by way of concluding remarks (p. 117):
In our discussion of the list genre and the sundry ways in which the author has used the technique of systematic interpretation with variation in the formal construction of words, phrases and complete sentences we have attempted to demarcate an intriguing aspect of his style which emphasizes the underlying unity of the individual units and the significant patterns to be found in them. In recent years generic concerns with 'apocalyptic' have dominated the study of the book at the expense of its rich literary qualities. This article has attempted to redress the balance a little by focusing attention on some aspects of narrative style. The close affinity of the list Gattung ["form"] in Daniel with the 'wisdom' traditions of Egypt and Babylonia also supports the view that the court tales had their origin in and were preserved by scribal circles within the framework of Israel's wisdom tradition.