To clarify, the question is about the nominative singular ending of first declension feminine nouns.
Some of those nouns end in a short -ă, and they’re accented accordingly on the antepenult: thálassa “sea”.
The remainder end in either a long -ā or a long -ē.
The difference in Classical Greek is a matter of dialect.
- Proto-Greek, along with Doric and Aeolic, used -ā. So “day” was hāmérā.
- Ionic regularly changed ā pretty much everywhere to ē (aː > æː > ɛː). So “day” was hēmérē.
- Attic famously was in between: it changed ā to ē, except after r, e, or i. So “day” was hēmérā.
- The rule gets violated on occasion, because it wouldn’t be Ancient Greek if there weren’t exceptions. The exception is when there used to be a digamma (w) between the r and the ē: kórwā “maiden” went to kórwē in Attic, because the ā wasn’t following an r at the time. Then the w dropped out, and the word ended up as kórē.
Things got unpredictable in the Koine, because dialects got mixed up, and because Latin loans messed things up as well by keeping their final a.
The basis of Modern Greek is Attic, but there has been some analogy at play; ē (now i) can be used after r, though still not after e or i (they’ve been merged phonetically in that context to [j]). So the adjective “second” has gone from deutérā to ˈðefteri. But “thick” has gone from pacheíā to paxˈja [paˈça].