This is a very similar concept to the experience gained by Pawns in Dragon's Dogma. Yes, there is generic experience for levelling up when they hang out with you personally, but they don't gain this experience when loaned to other players. What they do gain, is a three star rating of world and enemy knowledge. Fight an enemy a few times, and they'll be able to identify it easily ("Wolves, master!
). Fight in many times, and they'll become more accustomed to its attacks (they warn you of a wolves mauling attack, for example). If you use a variety of elemental and status effects, you can gain the final star as they become more knowledgeable about the enemies weakness ("They're weak to fire! Try blinding it! The cyclops' eye is its weakness!" etc). This also works with world knowledge. Enter an area, and they know about it (Oh trout, Gran Soren! etc) . Explore it fully and they'll be able to tell you things about it ("You can find chests hidden away behind buildings! There's a chest down there! Maybe we can leap down... etc"), and it also applies to the wildnerness ("There are often wolves prowling around this area... Beware of bandits, master" and so on).
It's a really unique system, and I find it adds a lot of depth to what are essentially handmade NPCs.