Because a is the third-person singular present form of the verb avoir, which means to have.
So:
In L’hôtel a dix-neuf chambres, l’hôtel is singular, so French uses a:
Do not confuse this a with the preposition à, which means things like to, at, or in, depending on context.
They sound the same, but they are different words.
Examples:
The accent matters in writing, even though pronunciation is the same.
In French, numbers like dix-neuf are normally written with a hyphen between the parts.
So:
For a learner, the important thing is simply to memorize dix-neuf as the normal written form for 19.
Because in French, after avoir with a quantity, you usually place the number directly before the noun.
So French says:
Literally, this is close to has nineteen rooms.
English sometimes uses structures that French does not need. Here, French does not need an extra word like of or with.
It matters because the singular definite article is based on gender:
But since hôtel begins with a silent h, both le hôtel and la hôtel would be impossible anyway. The correct form is:
Even though you see l’, the noun is still masculine.
There is a smooth connection in l’hôtel a, but the most noticeable point is that l’ joins directly to hôtel because the h is silent.
You may hear the sentence flow like this:
There is no special extra consonant sound added at the start of hôtel. The word simply begins with its vowel sound.