Barking at the Mailman is Very Common
The reasons why dogs bark at the mailman or at any delivery man that comes to the door, is because they are protecting their home. In their mind when the mailman walks away after putting mail in the mailbox, the dog thinks it was successful in scaring the intruder away. So whenever a mailman or delivery person comes to the door, they continue to bark thinking that their bark is what made them leave the premises.
Some dogs will actually bite a mailman or delivery person if they happen to be outdoors when they arrive. Most delivery people carry Mace on them in case a dog happens to charge at them. And since mail gets delivered six days a week, dogs get used to routines. Sometimes they will wait by the window or glass door in anticipation of the mailman.
There are also people who have homes with mail slots at the bottom of their front door. Often dogs will growl when he sees the slot being opened and mail being tossed through it. I once had a friend who had one of these slots and told me her dog shredded the mail that came through the mail slot. So she had to gate the dog in another room.