Quoted By:
Did you even pay attention during XY?
He was a king 3000 years ago whose Floette waifu died during a war. Using ancient magic/science he built a machine that revived her by sacrificing other Pokemon.
Still pissed off, he converted the machine into a lifeforce-powered death ray and annihilated both sides of the war. Floette left him because of all the death and destruction in her name.
AZ would end up wandering the world looking for her, with both of them having become immortal because of the machine's energy. AZ is so tall because he never stopped growing.
AZ also had a greedy, warmongering younger brother who snapped out it after seeing the weapon's carnage. He buried the weapon, but passed down its location to his family before dying. That brother's latest descendant 3000 years later is Lysandre.