It is hard to say for sure why your dog is licking the other dog's ears without more information. Here are some possibilities:
Possible reasons:
Affection: Dogs lick each other as a way of showing affection and grooming. Your dog might simply be showing love for their canine companion.
Playfulness: Licking can be part of playful interaction between dogs.
Stress or anxiety: Some dogs lick excessively when they are stressed or anxious.
Medical reasons: Occasionally, licking can be a sign of a medical problem, such as a skin condition or ear infection.
Taste: Dogs often lick each other's ears because they find the smell or taste of ear wax appealing.
What to watch out for: Excessive licking causing irritation, head shaking or scratching, redness or swelling.
What to do: Observe your dogs' interaction, rule out medical reasons with a vet, provide a safe environment, and redirect behavior if excessive.