

It smooths out the pronunciation when reading out loud.
Here’s some examples.
A farmer fed a animal and got a egg.
A farmer fed an animal and got an egg.
The woman put on a orange hat.
The woman put on an orange hat.
The duck quacked at a cat
The duck quacked at an cat.
The “a orange” could work if you produced a “uh” instead of “eh”. But I think an is the smoothest. “an cat” is just a fun incorrect use of an.
A has an important role in language, its more than just filler. I am not an English expert, but I can look up some grammar to refresh myself a bit.
Which animal, how many eggs, what cat, what hat?
“The” has the opposite role.
There is a cat at the pond. The duck quacked at the cat.
In the first sentence, I introduced the existence of a cat. In the second sentence I referred specifically to the cat.
https://www.merriam-webster.com/dictionary/indefinite article
https://www.merriam-webster.com/dictionary/a#dictionary-entry-2