Structural and dielectric properties of epitaxial SrTiO3 (STO) thin films on LaAlO3 substrates fabricated by a two-step growth technique using pulsed laser deposition were investigated by in situ and ex situ observations in terms of strain relaxation from the lattice mismatch between the film and the substrate. In a first step, a very thin STO layer of less than 10nm was deposited at low temperature. The main part of the film was deposited in a second step at high temperature, as commonly used for epitaxial growth. In situ reflection high-energy electron diffraction observations showed that almost full strain relaxation was realized before the deposition of the second layer, whereas the normally grown film was not fully relaxed even when the film thickness exceeded 300nm. The relaxation process of the two-step-grown film took place through the crystallization of the first layer with substantial misfit dislocation formation, which is therefore fundamentally different from that of the normally grown film. Since the normally grown film possesses compressive strain due to less strain relaxation, the two-step-grown film showed larger permittivity and larger tuning compared to the normally grown film. The estimation of the extrinsic loss contribution from the measured loss tangent implied that the two-step growth technique could suppress the extrinsic loss due to a redistribution of defects in the film. The first layer leads to two effects: (i) strain relaxation and (ii) lower loss of the film.