Ever wondered why the moon waxes and wanes as we observe it from the earth or why does he spend equal time in each of the constellations? Here is a story in the Mahabharata that gives to reason. The story is narrated by Vaishampayana to Janamejaya in the Shalya Parva where the former talks about the significance of Prabhasa (currently Somnath in gujarat) which was visited by Balarama during his thirtha yatra.
Daksha Prajapati had 27 daughters who were all married to the Moon. These 27 daughters helped man on earth to calculate the time and change of seasons. As it happens with several marriages, Soma (moon) was so fond of Rohini (one of the 27 daughters) that he spent most of his time with her. Disturbed by this, the other daughters went to Daksha and cried that Soma hardly pays any attention to them and lives mostly with Rohini. Angered with this, Daksha cursed the Moon to contract an incurable disease. As a result the moon started getting emaciated. As a consequence, all creatures dependent on the moon too started decaying. Only a small portion of the moon was visible. When the celestials went to Daskha requesting him to revoke the curse, Daksha mentioned that the curse is difficult to revoke. However, he added that Soma will regain his lustre and size once he bathes in the Prabhasa and spends equal time with all wives. He would wax for half a month and wane for half a month. Thus, Soma regained his lustre by taking a dip in Prabhasa and now we have the phases of the moon. He spends about 1 day in each constellation (nakshatra) i.e about 13.20 degrees thereby covering 360 degrees. The Nakshatra where the moon is located on a particular day is the birth star of the person according to the Hindu calendar.