Sometimes dogs who are shy can be afraid of men. A reason is not always known. Maybe it's because men tend to be bigger and have deeper voices. Might be because the dogs can smell the testosterone
I suspect that for many rescue dogs, it might just be neophobia (fear of new things). A lot rescuers and fosterers are women. And some of these dogs probably didn't meet a lot of men during their crucial socialization period.
Regardless of the reason, pet guardians need to figure out a way to help the dog feel better about members of the household.