Why are some of the books of the Septuagint (such as Maccabees 3 or 4) not part of the Catholic canon, if that’s what was used for forming the canon?
There was disparity in ancient versions of the Septuagint, and the Church did not uncritically accept every book listed in the respective versions.
1 and 2 Maccabees, which are canonical, address the history of Maccabean revolt. Meanwhile, 4 Maccabees treats the subject of Maccabean martyrs, and 3 Maccabees—which does not have any historical connection with the Maccabean period—derives its name because it addresses another persecution of Jews.
The Catholic Encyclopedia gives further details on why 3 and 4 Maccabees were not included in the biblical canon:
3 Maccabees is the story of a persecution of the Jews in Egypt under Ptolemy IV Philopator (222-205 B.C.) and therefore has no right to its title. Though the work contains much that is historical, the story is a fiction. 4 Maccabees is a Jewish-Stoic philosophical treatise on the supremacy of pious reason, that is, religious principles, over the passions. The martyrdom of Eleazar and of the seven brothers (2 Maccabees 6:18-7) is introduced to illustrate the author’s thesis. Neither book has any claim to canonicity, though the first for awhile received favorable consideration in some churches.
In addition in compiling the biblical canon, the shepherds of the Church, by a process of spiritual discernment and investigation into the liturgical traditions of the Church spread throughout the world, had to draw clear lines of distinction between books that are truly inspired by God and those that aren’t, including whether excerpts from the books were proclaimed at Mass in the early Church as well as read and preached about otherwise. 3 and 4 Maccabees didn’t make the cut.