This experience demonstrates both the beauty and the pitfalls of an empirical math model. However, at more extreme pressures and temperatures, the ideal gas law fails to predict the behavior of real gases by significant margins. Indeed the simple math model could then be used to successfully predict what we should observe at pressures and temperatures for which we had no data. Nonetheless, the empirical math model was sufficient to nicely fit experimental data for temperatures and pressures commonly encountered in ordinarily life. There was really no deeper understanding about various physical processes governing the behavior of a gas. The behavior of gases was observed at specific pressures and temperatures revealing a simple mathematical relationship between the relevant variables in the experimental data. The history of the ideal gas law is a great example of the development of an empirical math model. As the different pieces of this puzzle came together over a period of 200 years, we arrived at the ideal gas law, PV=nRT, where P is pressure, V is volume, T is temperature, n is # of molecules and R is the universal gas constant. Another 10 years after that in 1811, Amedeo Avagadro demonstrated that volume (V) and the number of molecules (n) of a gas obeys a simple mathematical relationship as more molecules are added, the volume increases by the same proportion implying that the ratio, V/n is constant. More than 100 years later, in 1787 and again in 1802, Jacques Charles and Joseph Louis Gay-Lussac demonstrated that the temperature (T) and volume (V) of a gas also obeys a simple mathematical relationship as temperature increases, volume increases by the same proportion implying that the ratio, V/T is constant.
In 1663, Robert Boyle performed a series of experiments at room temperature and observed that pressure (P) and volume (V) of a gas obeys a simple mathematical relationship as pressure increases, volume decreases by the same proportion implying the product, PV, is constant. To appreciate the distinction between curve fitting and what it means for a tool to be truly predictive it might help to consider how the ideal gas law was developed.