I would argue that conservation of energy is part of its definition, in other words energy was designed so as to be conserved. Because quantities that are conserved can reasonably be regarded as convenient. Think of it this way. Let's say we're a few hundred years back and we're working on this emerging concept we decided to call 'energy'. We probably already had the sensible idea of associating energy with motion (calling it kinetic energy) and temperature (thermal energy), maybe even in such a way that when a moving object is slowed down by friction, the heat given off and the loss in velocity correspond to equal amounts of this 'energy'. Later in time we would come to realise that we hadn't thought it all the way through. Say I have a sliding object on a curved rail that starts off vertically at the top and ends horizontally at sea level. I decide to hold the object still at a certain height. It is initially motionless at room temperature. I let go, it slides down the rail and heats up until friction brings it to a stop somewhere on the horizontal component of the rail. It is now motionless, as before, but hotter. It therefore has the same amount of kinetic energy but more thermal energy. 621
Where did it come from ? Placing an object above the ground gives it the potential to gain motion or to produce heat, or rather, height seems to be convertible into heat and motion. Therefore it seems reasonable to assign energy to height. Need a name for that form of energy ? Call it 'gravitational potential energy'. According to me, the concept of gravitational potential energy was invented in order to account for this otherwise 'gain' of energy. Indeed, it enables to claim that the increase in temperature results from the simple conversion of already existing energy.
The next step involves quantitatively defining our newly invented form of energy. Having already quantitatively associated energy with heat and motion, we could experimentally determine the amount of energy that a 1kg object has when held 1m above the ground by letting it slide down the rail and measuring the energy converted into forms we are already familiar with. Repeating with different masses at different heights we could derive a formula for gravitational potential energy that satisfies the sought after conservation of energy.
I have no idea which order the various formulae actually came up in, but I strongly believe this must have been the reasoning behind it.
A more mathematical approach based on the same idea is as follows. Assume you've defined (macroscopic) kinetic energy to be $\frac{1}{2}mv^2$. Using <PERSON>'s 2nd law of motion, you could prove that when an object is moving through a constant gravitational field $g$ and is subjected to no other force, the quantity $\frac{1}{2}mv^2+mgh$ is conserved. In your search for a quantity that is conserved, you would then define this whole thing as the energy of the object in question and, having called the first term kinetic energy, you would name the second one "gravitational potential energy".
In other words, energy is a mathematical concept, defined and scaled so as to be conserved in isolated systems. By the way, note that an isolated system is merely defined as a system where energy is conserved, so leaving out gravitational potential energy would result in a marble rolling down a slide inside a closed and thermally insulating box no longer being called isolated, and one might then consistently say that gravity is adding energy into the system. Whether this view is any less valid I don't know, but it's not the accepted one.
Anyway, why bother with such an invention ? Because to some extent it enables to predict the future. You won't actually have to drop a 75kg object along a sliding rail from 390m above the ground to know how much kinetic and thermal energy will be produced (at least in total). 483