My mind is so blown. "Good evening" is literally "On the topic of this evening..." Same with "good day." And further, I totally didn't realize hiragana ha was being used for those phrases. I thought it was wa! This makes so much sense! I can hardly think! (Root words bring me joy.)
Though, I do wonder why the pattern isn't continued for the mornings. ("Konasawa.") Instead, we have "ohayo gozai masu." What's the literal translation of this phrase? It ends in "masu" so is it telling someone to do something/informing that you will do something?