What is going on
Fear of men is common, and it is usually fear of a set of features, not men as a group. Men often have deeper voices, larger frames, heavier steps, beards, hats and a tendency to lean over or reach down. Any of those can look and sound different from what a dog has met before.
Some dogs fear men because of limited early exposure. A puppy who met few men in the sensitive socialization window may find them strange later. The research on this is stronger for the early window than for later ones, as we explain on our second fear period page.
Some dogs have had a bad experience. We can never know a rescue dog's history, and a story you were told may not be accurate. It is more useful to read what the dog does now than to guess at the past. Many dogs have no history of abuse at all and are simply wary.
Fear can also show up at adolescence, after a scare, or with pain. If the fear appeared suddenly, check with your vet.