Why can't energy be created or destroyed?

  • At the physics 101 level, you pretty much just have to accept this as an experimental fact.

  • At the upper division or early grad school level, you'll be introduced to Noether's Theorem, and we can talk about the invariance of physical law under displacements in time. Really this just replaces one experimental fact (energy is conserved) with another (the character of physical law is independent of time), but at least it seems like a deeper understanding.

  • When you study general relativity and/or cosmology in depth, you may encounter claims that under the right circumstances it is hard to define a unique time to use for "invariance under translation in time", leaving energy conservation in question. Even on Physics.SE you'll find rather a lot of disagreement on the matter. It is far enough beyond my understanding that I won't venture an opinion.

    This may (or may not) overturn what you've been told, but not in a way that you care about.

An education in physics is often like that. People tell you about firm, unbreakable rules and then later they say "well, that was just an approximation valid when such and such conditions are met and the real rule is this other thing". Then eventually you more or less catch up with some part of the leading edge of science and you get to participate in learning the new rules.