In glycolysis, the conversion of glucose to pyruvate results in a net gain of 2 ATP molecules. In gluconeogenesis however, the conversion of pyruvate back to glucose requires 6 ATP molecules. Why does there seem to be an apparent loss of energy?
This energy is not lost, it is dissipated as heat.
And this must happen because of thermodynamics -- the direction of the reaction is simply determined by the difference of energy between substrates and products, and it must be positive for the reaction to happen spontaneously.