New Stanford Encyclopedia of Philosophy entry on the emergence of first-order logic by William Ewald:
For anybody schooled in modern logic, first-order logic can seem an entirely natural object of study, and its discovery inevitable. It is semantically complete; it is adequate to the axiomatization of all ordinary mathematics; and Lindström’s theorem shows that it is the maximal logic satisfying the compactness and Löwenheim-Skolem properties. So it is not surprising that first-order logic has long been regarded as the “right” logic for investigations into the foundations of mathematics. It occupies the central place in modern textbooks of mathematical logic, with other systems relegated to the sidelines. The history, however, is anything but straightforward, and is certainly not a matter of a sudden discovery by a single researcher. The emergence is bound up with technical discoveries, with differing conceptions of what constitutes logic, with different programs of mathematical research, and with philosophical and conceptual reflection. So if first-order logic is “natural”, it is natural only in retrospect. The story is intricate, and at points contested; the following entry can only provide an overview.