Until very recently I believed that the Lorentz transformations were defined as "the transformations that carry one inertial reference frame into another". In Wikipedia's page we find something along these lines, since the starting sentence of the article is
In physics, the Lorentz transformation (or transformations) are coordinate transformations between two coordinate frames that move at constant velocity relative to each other.
Now, Griffiths introduces the topic in his Electrodynamics book in the following way:
Suppose that we know the coordinates $(t,x,y,z)$ of a particular event $E$ in one inertial system $\mathcal{S}$, and we would like to calculate the coordinates $(\overline{t},\overline{x},\overline{y},\overline{z})$ of that same event in some other inertial system $\overline{\mathcal{S}}$. What we need is a "dictionary" for translating from the language of $\mathcal{S}$ to the language of $\overline{\mathcal{S}}$.
He then uses quite simple arguments to convert measurements made in $\mathcal{S}$ to measurements made in $\overline{\mathcal{S}}$. In the end it all comes down to the application of length contraction and time dilation in a correct way. In that sense, following Griffiths: if we accept the postulates of relativity as a consequence we have time dilation and length contraction and then if we pick two inertial frames in relative motion we can derive a transformation which is a Lorentz transformations.
This is the idea I always had about the Lorentz transformations, they are simply the only allowed transformation between inertial frames when we accept the postulates of relativity and their consequences.
On the other hand, it appears that this is not the definition. It appears the true definition is that the Lorentz transformations are the transformations which leave the speed of light unaltered or else the ones which preserve Maxwell's equations.
I must confess I still didn't get it. So my question is: what is the real definition of the Lorentz transformations? How they are defined and what is the motivation for the definition?