I know that Gaussian (or other quantum chemical packages) assumes the molecule is alone in vacuum, that is, the molecule doesn't interact with anything, when optimizing the molecule.
But I've found that optimization at HF or DFT levels results are almost the same as experimental data, which were from the solid state by X-ray diffraction. Everyone knows that the solid state is quite different from the vacuum, for molecules interact with each other in the solid state.
Then why do the two generate nearly the same results? Or have I looked at so few samples that I neglect occasions when the two give quite different results?