Finite fields, I believe, were introduced by Galois in his paper "Sur la théorie des nombres", found on page 398 of his Oeuvres. In this paper Galois introduces the idea of taking a polynomial equation $f(x)=0$ having no solution modulo some prime, and introducing an imaginary number $i$ to act as its solution, giving a very concrete construction of a finite field.
Galois simply says he was led to this idea "by some researches on incommensurable solutions", and that the goal of the paper is "the classification of these imaginaries, and their reduction to the smallest possible number".
While the idea of studying how adjoining imaginary roots behaves in the structure $\mathbb Z/p\mathbb Z$ is interesting in its own right, are there any particular applications that Galois might have had in mind? What applications were made of his ideas immediately after their diffusion? Was anyone else studying and applying the concept of finite fields independently of Galois? Or were they introduced purely for their own sake, and had to wait a long time before applications were stumbled upon?