AFAIK Einstein was motivated for special relativity from the framework of electromagnetism. It is in Maxwell's theory of electromagnetism that the Lorenz transformations appear naturally.
If you look at Maxwell's equations, for example in this form here, it is based on four "laws" , there are four "laws" . These are an example of the laws that Einstein must be talking about, to start with . These laws are a distillate of experimental observations. By using them as axioms Maxwell picks those solutions of his differential equations which fit the experimental observations by intent. His theory has to fit the "axioms" he is using to pick up the valid solutions. Since his theory is well validated, i.e. is predictive of data, the domain where the laws hold is the inertial frame domain, as defined by " an inertial frame of reference is a reference frame in which a body at rest remains at rest and a body in motion moves at a constant speed in a straight line unless acted on by an outside force."
So what Einstein did with his special relativity is to extend the electromagnetic behavior to the behavior of massive particles. He chose such postulates, so that the electromagnetic theory would remain intact, and there would be new predictions for the behavior of matter. These predictions have been validated and the special theory of relativity holds.
Inertial frames are necessary in the definition because special relativity deals with the concept of energy. Momentum , energy, angular momentum are conserved in inertial systems, there are conservation laws. BUT these laws hold only within inertial systems. When accelerated systems are introduced these laws do not hold without corrections.