Enjoy your meal.
a good
That's like asking "origin of good health? It's part of the Spanish language and it's a phrase made up of words that were developed by Spaniards many years ago. Perhaps a better question would be...
"Buenos días" (lit. "good days") or "buen día" (lit. "good day") both mean "good morning."
"Have a nice day".