Thermal-expansion-derived lattice instability in La2CuO4