Let's start with this. Per Merriam-Webster dictionary the FIRST definition of pet is either:
a) a pampered and usually spoiled child, or
b) a person who is treated
with unusual kindness or consideration
and the meaning of a domesticated animal is only the SECOND definition.
Thus, teacher's pet is a person that the teacher treats with unusual kindness of consideration (generally because that person is a favorite of the teacher).
Like a teacher, any other person can have a pet: a boss, a co-worker, a doorman, anyone.
Second, the similar terms pet project/theory/subject/etc are well-known and mean:
a plan, idea, or subject that you particularly like or are interested
All of these terms are related. For example, when you say that a student is the teacher's pet, it means that that student is a favorite of the teacher. A pet project is the same concept: a pet project is a favorite project of someone. Similar with theory, subject or whatever. The term always means a favorite.
There is a related term that can be applied to other people and used for some adults. It is pet cat. It is an example of coach-speak and particularly popularized by American football coach Bill Parcells and his staffs. The original meaning of the word as used by Parcells and his coaches is:
14 January 2007, Macon (GA) Telegraph, Michael A. Lough column: “I
knew it was a bad sign when Bill Parcells talked about how ‘very, very
athletic’ his pet cat, Cody, was earlier in the week. Men should never
publicly acknowledge owning a cat.”
30 March 2007, Fort Worth (TX) Star-Telegram, “Trying to eliminate
‘cat’ calls,” pg. D6: IRVING — Bill Parcells was a cat guy. He had a
big, fat pet cat at his house. And he had his pet cats at Valley
Ranch, too. Especially in April. “Pet cats” is a Parcellsism; they
were the prospects whom a coach or scout adored. They are often so
fond of such prospects they try to make sure their “pet cat” is
drafted, regardless what the scouting consensus is. And every coach,
general manager or scout has a pet cat; 2004 second-round flop Jacob
Rogers was a Parcells’ pet cat.
However, it has begun to take on a life of it's own and is being used on a broader basis:
Among Cowboys fans, pet cat has since come to refer to a player who is
a bubble player (even making the practice squad is often considered
pet cat success) and is commonly selected from the very bottom of the
roster where you'll find late-round draft picks, undrafted free agents
or even street free agents. The pet cat is often - and preferably -
chosen without the slightest factual or quantifiable basis. In fact,
some would argue that you do not choose your pet cat, your pet cat