Energy is always conserved. It is not created or destroyed but is just transformed from one form to another. In every day life a lot of energy is dissipated as heat due to friction. This is because its force is insufficient to overcome the frictional forces between the pyramid and the ground.
Frictional forces depend upon the total force which is directed perpendicular to the surface.
The more weight per unit area, the larger the frictional force. Here is a more complete description of friction. Throwing a ball into the air represents a situation in which the total energy is fixed and there is a continous transformation from kinetic energy to potential energy. Consider hitting a baseball.