In collaborative practice, custody of pets is determined by agreement and interest-based negotiation.
In a traditional litigated divorce, pets acquired during a marriage would usually be considered marital property and would be divided "equitably" by a court. Animals do not have standing in court, therefore the pet's best interests are not a direct concern of the judge. Usually the party best situated to care for the pet and with a demonstrated history of being the primary caretaker has the best chance of receiving custody of the pet.