One way to think of it is that energy is a property of matter (more precisely, it's a property of quantum fields, not just ordinary matter that we're familiar with). It's a property in the exact same way that position or momentum or electric charge are properties. Though these properties have different characteristics, they all follow conservation laws given certain assumptions.
The interesting bit, to me, is
how the physical laws of the universe result in these conservation laws. That stems from what is known as
Noether's Theorem. The idea there is that if you write the laws of physics (or of the behavior of a system) down in a certain particular way, you'll find that you can change certain variables and the equations are unchanged. Noether's Theorem demonstrates that if the system has this property that changing one variable leaves the system unaffected, then that implies you can write down a parameter which is a constant for the system. If your system is unchanged, in a specific mathematical way, if you move the system from one location to another, then momentum is conserved. If the system is unchanged if you rotate it, then angular momentum is conserved. If the system is quantum-mechanical, and it's unchanged if you change all of the quantum phases of all of the particles that make up the system, then electric charge is conserved. And if the system is unchanged if you examine it at different points in time, then energy is conserved.
That last point is important for General Relativity: it shows that in an expanding universe, energy cannot be conserved (in the simplest sense) because the system is changing over time. You
can recover a related conservation law by making some different assumptions, resulting in conservation of the stress-energy tensor (which includes energy). This means that while energy isn't conserved, it changes over time following very specific rules determined by the conservation of this more complicated object.
You can also recover a different sort of energy conservation by using what is known as "Hamiltonian formalism" of General Relativity which ends up applying a sort of energy to the space-time curvature itself (sort of like a gravitational potential energy). But this formulation hasn't been shown to work in all cases. In general it's