Las Mañanitas comes from the Spanish when they brought religion to Mexico. The custom was that depending on the day you were born was the name you were given, this name was in reference to a Saint, that is to say, if you were born on the day of San Juan, you were named Juan, that is why previously it was said that you celebrated the day of your Saint. Likewise, the song Las Mañanitas makes reference to this when it says "Hoy por ser día de tu Santo" (Today because it is your Saint's day).
As time went by, United State customs arrived in Mexico and new names emerged as well as the celebration of the Saint's day, which would now be the birthday. For a long time some people had two celebrations, the day of their saint and the day of their birthday, to this day some people celebrate it this way.