For example, in this page from The Feminine Monarchie, Or the Historie of Bees, Charles Butler sprinkled his text with a bunch of Latin phrases, and does so often throughout the book. Why did so many writers do this, instead of just writing in English the whole way through?
Some possible explanations that spring to mind:
In this particular example, the Latin lines are quotations from Butler's sources. You can see these given in abbreviated form in the margin: Pliny, Aristotle, Ambrosius, Basil and Virgil (the unattested quotation at the top seems also to be Virgil).
But why in Latin? You're quite right to identify Latin as a language which was associated with a great deal of prestige. In 1623, English still had a long way to go towards universal acceptance as a language appropriate for higher learning. To quote widely in the original from a great range of Latin authorities (on just this page we have sources natural historical, theological and literary), Butler affirms not just the truthfulness of what he writes but also the comprehensiveness of his own knowledge. We are assured that he is well-educated and widely read in the subject, and that the validity of his book is therefore supported not just by the authority of his sources but that of Butler himself. (Whether or not we ought to believe this impression is a different matter!)
It's worth noting, of course, that this has other effects. To read these quotations fluently when inset into the text requires of its reader at least some grasp of Latin (and, ideally, enough familiarity with the names of Butler's sources to untangle the abbreviations). This is not a book that just anyone can read - it assumes a readership of a certain level of education, and makes it more difficult for the uninitiated to access the text. This is a phenomenon that persists in some forms to this day. I occasionally come across the work of early twentieth-century scholars, for instance, who will refuse to translate particularly bawdy or scatological historical anecdotes into a more accessible vernacular. It can work the other way too - by keeping his quotations in Latin, Butler is spared the potential embarrassment of a mistranslation.
Just for context's sake, I'll note that at the time of Butler's writing it was really not so long ago that it was English that was relegated to the margins of scholarly books. Indeed, some of the very earliest Old English survives as glosses and marginal additions to entirely Latin books. Well into the later Middle Ages books of science, theology and history were predominantly written in Latin, and even as English begins to really gain traction in these genres from around the fourteenth century it was entirely typical for authoritative Latin to hang around in internal quotations like these or as marginal glosses, references and reader's notes (perhaps most commonly of all nota bene, "note well"). By preserving Latin in the English text Butler invokes an additional kind of prestige, which is connected to that of the language but slightly harder to define. He makes his book look the way scholarly books had looked for centuries; it has stuffed margins, and shifts in script and layout to accommodate (and emphasise!) the macaronic text. That is just as important a contributor to the book's aspirations to the appearance of comprehensive knowledge.