One big reason why Naval boarding parties carried handguns is because they could used them in the highly confined spaces under decks without running into maneuverability issues. A pistol also allowed them to carry another primary weapon, such as a cutlass or a boarding axe.
Blunderbuss-type weapons were also used because they were short, but they also required two hands, which was considered a liability.
"The gift which I am sending you is called a dog, and is in fact the most precious and valuable possession of mankind" -Theodorus Gaza
Baby Jesus cries when the fat redneck doesn't have military-grade firepower.