I thing they build up as you fight battles! If you go to friendship in skills list, you can "view" how many points you have with each one. Maybe because I had Grom first, he built points with hero faster, and they became "partners" so that Grom increased hero's defense and hero increased Grom's attack (or other way around)
I must cherish every moment, for it soon will rush away And be lost to me forever, as a part of yesterday