This happens in every institution and in every day interactions. Several years ago, after purchasing my own home with my own money, I was having a washer and dryer delivered. My (male) partner at the time happened to be present as the delivery man wheeled the machines in and installed them. The delivery guy asked questions and talked about the appliances, all the while addressing himself to my partner. My partner tried to redirect the man's attention several times, saying "It's her house, I don't live here," and "Talk to her, it's got nothing to do with me." The delivery man just couldn't do it. He continued to talk to my partner, acting as if I didn't exist.
I can't imagine how frustrating it would be for a woman in that situation.
I once wrote a piece here about how everyone should work in the restaurant industry at one point in their lives and this paragraph reminded me of it. Why? Because I could have been that maintenance man if I hand't worked in a restaurant. You learn pretty quickly as a server that you don't place the bill in front of the man by default. When you approach your tables, you have to read for the, often subtle, clues that indicate who the "head" (if there is one) of the table is. Don't assume anything.
Of course, you don't need to have worked in a restaurant or service industry to realize this, but it does help.