It just is. Noun classes (grammatical gender) are mostly arbitrary. The category labels "masculine" or "feminine" or "neuter" are just what they're called. Don't read too much into it.
Not all languages distinguish between "one" and the singular indefinite article. Even in English, "a/an" and "one" have the same etymology.
"Una " and "Un " seem to have the same meaning but not in different sentences
"una" is the feminine form used with feminine nouns.
"un" is the masculine form used with masculine nouns.
That has nothing to do with it. Grammatical gender is largely arbitrary. But in Italian, you can (mostly) tell what gender a word is by how it ends:
-i -- masculine
-e -- feminine
Some words are
-e in the singular and
-i in the plural and you just need to memorize on a case-by-case basis if they're masculine or feminine.