I think it helps if you define a visit.
For the first couple of weeks, people arranging a reasonably convenient time, staying for half an hour to an hour to drink tea (that they've made themselves), having a cuddle and securing all-important photograph of themselves holding the baby - fine.
People turning up at times to suit them, wanting to be fed and watered, wanting to stay for two hours or more and regale you with tales of their own experiences and opinions of childbirth and babyhood - not fine.
If you are unfortunate enough to know a lot of people who belong to the latter group, I can understand a blanket "no visitors" policy.
I think a lot of people say "no visitors," but then actually invite the people they are really close to. It's so hard to draw the line and I think people who aren't directly related or involved in the life of the arriving child really need to get over themselves and realise that, however kind their intentions, the new family has better things to do than socialise just for those very few first days. We have our entire lives to be pushed & pulled by the expectations of others - if a family chooses not to just for 10 days or so, more power to them I say.
Another difficulty before a birth is people asking "How soon after the baby is born can we visit?" Well, that's really hard to call. Childbirth can be anything from a few hours of privacy needed at home, right up to a death-defying experience for mother, child and partner. Hard to inflict a visitors policy on that until the time comes.