Why there is no article before the noun?

Hello everybody
I am so glad to talk to you again, and I have a very confused question:

Why there is no article before the noun " president" in the following sentence:

The voters elected Mary president.

and can we say :

He gave her the watch gift.

I thought about it deeply but I could not find the answer

My regards

Raja

there are alot of words that are not preceeded by an article for example:meals like dinner . Besides , the verb"elect" can come in the same way not only with"president" for example: we elected jane guide to our trip.