The only free and comprehensive online etymological dictionary of the Spanish language
-a (2) Forms masculine nouns.
From Vulgar Latin *-a 'id.' According to Penny (2002), the ending probably survived in Old Spanish only in día as other masculine nouns with this ending were the result of scholastic remodeling under the influence of Classical Latin. From Latin -a, the first declension's nominative singular ending. From Proto-Italic * 'id.' From Proto-Indo-European *-eh2, a nominative singular ending. See also -a (1).