CB's explanation is 100% right on. It is a linguistic question dealing with phonology. By the way, the same principle is in play with the plural noun ending 's/es': 's' after a non-voiced consonant (lamps, desks); 'z' after a voiced consonant or a vowel (dogs,...