None of the various word tracers has attempted to explain why the small shut-off valve was named petcock.
Though a cock, it is distinctly no one’s pet.
Until someone turns up with a better explanation, we suggest that pet was merely a contraction of petty or petit, meaning “small, minor, inferior.”
An objection to this theory is that we have no record that the valve was ever known as a “petty cock”; it was petcock (or pet-cock) from the earliest printed use, around the mid-nineteenth century.