While I certainly agree with you, I think the GM's role here is not nearly as passive as your phrasing implies. (I'm not sure if you meant it to be so passive.)
That is, I find there are a handful of fairly reliable routes to getting your players to like an NPC, such as:
- Make them friendly and supportive, especially if they actually do helpful things for the party
- Have them trust the PCs with their secrets, so the party feels like valued allies
- Show the NPC's respect for the party, e.g. unshakable confidence or speaking up for them in a social setting
- Make 'em funny, whether by being witty/sarcastic, or bumbling and silly, a good laugh never hurts
- Give them relatable goals that the party can support, e.g. a romance between two ally NPCs, or climbing the social ladder
- When the party is in need, have the NPC act without restraint to support them
There will always be X-factors like "omg this character is just so COOL" or "I just love the stupid voice you gave her" or "you named him JAFAR, of course we knew he was EVIL" (that last one literally happened...except that "Jafar" came from a name generator! He
is a jerk though, don't get me wrong.) But if you do some subset of the list above? You're well on your way to establishing a party ally. Most groups respond positively to most of these things.