Given that the meaning of the Greek word "deuteronomos" is 'secondary' it is expected that the name should be given to the 2nd book rather than the 5th: so why is the 5th book of the Bible called Deuteronomy?
The English "Deuteronomy" is derived from the book's name in the Septuagint: "Deuteronomion", meaning "Second Law". The Hebrew name for the book is "Devarim", or “[the] words", the book's opening words.
The introduction found in the Oxford Jewish Study Bible explains the origin of the Greek name:
That approach to naming the book represents the Greek translation of the Hebrew phrase “Mishneh Torah” found in Deuteronomy’s Law of the King, where it refers to “a copy of the law” (17.18 n.). That phrase was understood in ancient rabbinic sources as a reference to the book of Deuteronomy itself (Sifre §160), understood as a “second law” or “repetition of the law,” because of the extent to which Moses, throughout the book, revisits the earlier laws and narratives of the Tetrateuch (the first four books of the Bible) and teaches Israel about them (see Naḥmanides on Deut. 1.1 and Ibn Ezra on Deut. 1.5).
As has been pointed out it is named Deuteronomy because this combines two Greek words δεύτερος (deuteros) which means second and νόμος (nomos) which means law. It was given the title of the second giving of the law.
The reason for its placement last in the Torah is due to the fact that it came at the end of the 40 years of wandering in the wilderness after Israel sinned at Kadesh Barnea. That means that the Torah has a loose chronological basis. The events of Genesis coming first. The events of Exodus coming second, with Numbers and Leviticus coming in the early days after having left Egypt. Then nearly forty years later Deuteronomy since the original generation had all died except for Joshua and Caleb.
This of course depends on the belief that Moses wrote the entirety of the Torah except for the small portion at the end of Deuteronomy that records his death (most likely Joshua added that part to the Mosaic content). I reject the notions of source criticism that attempts to suggest multiple authors and that the Torah was not finalized until after the captivity. That false theory is known as the Graf-Wellhausen theory as put forth in the middle of the nineteenth century.
The simple answer is that- the laws that were already given once, while the Israelites were in the wilderness, by God are being repeated a second time just before they cross over the river Jordan as a reminder to keep God's commandments.
It's a retelling, a second giving of God's law, hence the name. It's also the reason you'll find the 10 commandments once in exodus and again in Deuteronomy.
All Pentateuch books got their name from the first verse, and in Hebrew this book call "Dvarim" (literally "things, what one has to say").
The sages of the Mishna and the Talmud refer to this book as "second things" (took it from verse 18 ch 17) and this is the idea beyond the name that the Septuagint uses: Deuteronomion - Second Law.