This is a tale of Chandra, god of the moon. He was married to 27 sisters, the daughters of Daksha, because he was 1000% the kind of cool playboy to pull off that kind of hat trick. But alas, even Chandra was not immune to playing favorites, and of all his 27 wives, he especially favored his fourth wife, Rohini, and spent far more time with her than the others.
Needless to say, the other 26 sisters were less-than-impressed by this.
Resentful that they weren't getting their fair share of attention, the other sisters complained to their father about the situation. Not brooking any disrespect toward his other daughters, Daksha cursed Chandra in a fit of pique, that his powers would decline with each passing day.
Pretty quickly, Chandra's other wives realized, "Oh no, we hecked up." They hadn't wanted him to be punished, just made to give them equal time and attention. They, and Chandra, began to worry. What if he just disappeared one day along with his powers?
Chandra begged Daksha to lift the curse. "Yeah.... about that...." Daksha shrugged. "Once a curse is uttered, it can't be taken back. There is nothing I can do about it," he explained. Chandra was crushed. "But, tell you what," Daksha continued, "I can't do anything, but maybe try talking to Shiva. See if he can help you out."
So Chandra went to the shrine of Shiva at Prabhas Patan, and there prayed earnestly to him, begging him to lift the curse. Pleased by Chandra's pious devotion, Shiva appeared to him. "Hey, I appreciate the situation you're in, buddy," Shiva told him, "So, bad news first: I can't lift the curse either. But, good news, I can soften it. From here on out, your power will wane for 14 days, and then it will wax for 14 days. You will fill the world with your radiance on full moon days and disappear on new moon days."
Chandra wasn't exactly happy about this. The crescent moon shape would be a permanent reminder of the curse and his reduced strength. But Shiva said, "Hey, cheer up, little buddy. Don't think of the crescent as a sign of a loss of power, but that you still have some strength left! Glass half full! In fact, I will wear your crescent in my hair so that you will be my constant companion--you can fit me in along with your wives, right?--and show all of my devotees that they are dear to me, even in their lowest moments."
Chandra figured it would have to do. And thus Shiva came to be known as Chandrasekhar, or ‘the one with Chandra mounted on his head’.
And that is why the moon waxes and wanes.