I’ve noticed many pictures of bars in the late 1800s/early 1900s were filled with entirely men. Why was this? Was it abnormal to have mixed gender events or friendships?
So there are a couple of things going on here. One is that women not appearing in photos in bars/pubs/saloons doesn't indicate that women were never friends with men: drinking establishments were often officially or unofficially coded as masculine spaces, particularly if they served a middle-class clientele. (Working-class establishments might still segregate women into a specific area of the building, possibly a room closed off from the main action.) This is largely because it was seen as inappropriate for middle-class women to spend time in public places, drinking alcohol - it was unrefined and unrespectable. Women of this class were supposed to enjoy quieter pleasures in their homes or the homes of their friends, or perhaps in a salubrious location out-of-doors like the seashore or a tennis pitch. It was often assumed that women appearing in respectable eating/drinking places alone were prostitutes looking for customers, so it was in a restaurant or pub's best interest (from the proprietors' perspectives) to discourage them.
But beyond this, women and men, married and unmarried, certainly had friends of the opposite gender. The 1858 diary of Stephen DeForest Hopkins, for instance, describes young women paying calls on his family many times, noting that he knew and socialized with them. Belle Wright came with Bill Peat on August 31, and the two talked to him alone for some time as he rested his injured foot; in the evening, Dick Rice came and played backgammon with Stephen's sister, Mary. Gert Hawley and Minnie Cronkhite also paid a call on the house as a whole and conversed with him alone, a few days later. He regularly referred to young women in his generation by their first names, indicating a degree of familiarity and intimacy, and talks to them at his house, their houses, in public, and at parties. (Lest you think he was just being a player, Stephen was madly in love with his future wife, Lizzie, and regularly agonized over the fact that they couldn't yet marry.) He also corresponded with at least one female friend, a young woman named Fannie (possibly Burnham) who was studying to become a teacher.
As another example, there's Florence Ranger's 1879 diary, in which she discussed much the same sort of social interaction. On February 8th, she wrote:
After tea Will & Lodice came up played euchre all the evening Gertie up to Jennie Wait's Charley Dix came after her to take a ride, about 7.30, went up to Jennie's and took them both.
On the 14th,
At three o'clock Nell's father took, Nell, Lodice, Kate Thomas, Julia Parks Jennie Susie Gert & Carrie, up to Long Pond. for a short hour's skating, in his three-seated Rig. Charley Dix brought Paul Dakin up in his Cutter & the Underwoods came also. home about 5:45, Arthur brought Carrie home in the Cutter Herbert went in the [had?] also Dakin and Lodice rode home with Charley Dix. At seven they all went to their Club Meeting at Willis Haviland they went down in a farm rig, home at 11.15.
During the summer, similar mixed-gender groups would attend balls and "hops", and go boating and picnicking. (Though I would note that Florence typically was only reporting on the social events her younger sisters, Gert and Carrie, attended – it's not really clear why she tended to stay home.) While these events offered opportunities for romance to blossom, they weren't inherently romantic. Boys and girls would attend as friends and simply have a good time together. In the case of dances, this was especially important – typically, a girl's escort was instrumental in making sure that she had many dance partners besides himself.
By the late nineteenth century, young people were expected to arrange their own marriages/engagements from within the social circle their parents had allowed them to construct. There was always the chance of a parental veto, but adults simply didn't barricade young women in the family home and then let them out once a suitable husband had been selected. Having friendships and connections of their own was an important aspect of creating the next generation of the social circle. (There is more to be said about married men and women, but I simply don't know as much about that as the unmarried/courtship stage.)