In the Longman Student Grammar of Spoken and Written English, we read:
When a predicative noun phrase names a unique role or job, either a zero article or the is used.
Custom and convention in English are to use the zero article before predicative nouns after verbs like elect and appoint, and other verbs when the meaning of the verb is the assumption of an elective office, named position within an organization, or other clearly defined role. In these cases, the name of the role is treated almost as if it were a proper noun. For instance:
- He was elected President
- She was made CEO of the corporation
- He was appointed chairman of the commission
- She was proclaimed Queen
- She became Speaker of the House
- I will take the child as ward
As is sometimes the case in English (as in any language!) there is no "grammatical" explanation for this custom. There are many common English expressions in which the zero article is used, and there is no "rule" that can be applied to determine where the zero article is expected and where it is not. See for instance:
- He was taken prisoner
- She is chef, owner, and head dishwasher
- He took office