Rendre visite à qqn – the expression implies using an indirect object => "COI" personal pronouns (le complément d'objet indirect).
From the Latin reddere = to return / give back. King James Bible "Render unto Caesar that which is Caesar's". In French "visiter" for places and "rendre visite" for people. In English we can pay a visit or simply visit a person but in French use rendre visite. Also leur indicates an indirect object = to them not them. Cf; I pay a visit TO them, not I pay a visit them, but I pay them a visit also makes sense. This is why object versus indirect object is very difficult for English (especially US) speakers as we do not make a clear distinction.