In the עשרת הדברות, we have (כ:ו) וְעֹשֶׂה חֶסֶד לַאֲלָפִים There is a פתח under the ל. Now, under normal circumstances, a ל+פתח indicates the definite - to the, a short form of לְהַ, whereas ל+שוא would indicate the indefinite - to a. However, those rules change when the main word begins with a שוא or חטף. Since a word may not begin with two שואs, the פתח is used for the indefinite, whereas, in this case the definite would be indicated by a ל+קמץ. In a previous year, I corrected the בעל קריאה when he said לָאֲלָפִים.
Curiously, in just a couple of weeks, we will read the י"ג מידות in כי תשא. There we find (כ"ד:ז) נֹצֵר חֶסֶד לָאֲלָפִים. Why does it change from לַאֲלָפִים to לָאֲלָפִים, from thousands to the thousands?
I posed this question to a WhatsApp Dikduk group. The sum of the answers I received amounts to the following: In the עשרת הדברות, the "the" is not necessary because thousands is immediately qualified by אוהבי ולשומרי מצותי. When אלפים is used in the י"ג מדות is referencing "the know" thousands, as previously explained. That is why it is in the definite form.