Not just pirates (it's a movie thing) but sailors in general were limited in space and how much they could carry on a voyage. Pets were a luxury, dogs, would most likely get eaten in a voyage. Cats thrown overboard. Birds, however, took up little space, ate bugs and crumbs. And more important, when at sea, would not fly far from the ship.