[French -aire; Latin -aris and -arius.]
Such adjectives broadly have the senses ‘of the kind of’, ‘belonging to’, ‘connected with’, or ‘pertaining to’. Many taken from Latin have been brought into English under the influence of French, such as voluntary, from Old French volontaire and Latin voluntarius (itself derived from voluntas, will), or military, from French militaire or Latin militaris (from miles, milit-, a soldier).
Some come from Latin words ending in -aris, such as capillary (Latin capillus, hair), and exemplary (Latin exemplum, sample or imitation); further examples of like kind are ancillary, epistolary, maxillary, and salutary.
Others are from Latin words in -arius: necessary (Latin necesse, needful); elementary (Latin elementum, principle or rudiment); and arbitrary (Latin arbiter, judge or supreme ruler). Words of similar source include contrary, honorary, mercenary (which can also be a noun), and primary.
The ending is active in English, and a number of adjectives in -ary have been formed from English nouns. Examples are: budgetary, complimentary, discretionary, fragmentary, inflationary, parliamentary, revolutionary, sedimentary, supplementary, and visionary.