'Pet' etymology

"domesticated or tamed animal kept as a favorite," 1530s, originally in Scottish and northern England dialect (and exclusively so until mid-18c.), a word of unknown origin. Sense of "indulged or favorite child" (c. 1500) is recorded slightly earlier than that of "animal kept as a favorite" (1530s), but the latter may be the primary meaning. Probably associated with or influenced by petty.

Source : Etymology online

Note: The Online Etymology Dictionary maintains a free-access list of the origins of thousands of English words, a significant proportion of which are unknown.