Well, even if it's a legendary Pokemon, every Pokemon (like a human) develops and strengthens with age. With humans, we can't even walk, let alone lift heavy things as babies. Same with Pokemon. At level 1, they can usually do no more than Pound, Tackle, etc. But as they progress through the levels (similar to humans getting older), they can naturally learn moves like Earthquake or Giga Impact. (Notice I don't coun't TMs. They're the steroids of Pokemon, besides items like Protein or Calcium.)
So in summary, it's just the progression of age/level.