The idea that logic is a branch of mathematics is itself a modern notion. Aristotle's logic was part of the trivium (grammar, rhetoric, and logic) in classical notions of education, while mathematics made up several parts of the quadrivium (arithmetic, geometry, music, and astronomy).
Of course in retrospect we can see that the syllogistic part of Aristotle's logic can be formalized (as can grammar), but it was viewed as part of language or philosophy. I get the impression that a lot of more traditional philosophers of logic hated the formal turn.
Leibniz anticipated the turn towards formalism, but he didn't publish any of it in his life and it wasn't rediscovered until the 20th century.