A posture like the one shown is not a sign of a friendly interaction; typically a cat who is feeling threatened by another will crouch back like that and give a warning growl. In this case, if it was the other cat crouched like this, your cat was the aggressor, likely defending his "territory" of the yard from another cat.
It is not a good idea to allow your cat outside, particularly if the cat is unsupervised. Cats face a large number of risks when they are outdoors, including but not limited to injury from fights with other cats, death from larger predator animals and birds of prey, death from vehicle traffic, injury or death from animal cruelty, poisoning (accidental and deliberate), severe (often fatal) illness, injury or death from traps set for other animals, and parasites. An indoor cat lives, on average, about 17 years, while an outdoor cat lives, on average, only about 5 years (per WebMD). That's less than 1/3 of the lifespan of their indoor counterparts. On top of that, outdoor cats, including "well fed pets," can devastate local wildlife populations. In the US, the conservative estimate of impact on birds is over 1 million killed by domestic cats per year; they also impact local small wildlife (rabbits, squirrels, etc), serve as an additional vector of disease transmission, and transmit toxoplasmosis to wildlife, which may make small prey animals more vulnerable to predation by other local wildlife (per National Wildlife Federation).
Cats are not monogamous. Your cat doesn't have a "girlfriend," but if you have not desexed him, he is likely roaming over large distances to find any and every female cat in estrus to mate with them. Overpopulation of domestic cats is a problem in many areas, and an intact tom will roam very far from his home "territory" to seek opportunities to mate, contributing to this overpopulation issue for a fairly wide range. The average male cat will roam more than three times the distance of a female cat, covering a territory of around 153 acres (a radius of around 500 meters/1500 feet), with intact toms likely to roam even farther (per PetHappy).