Most of us have to admit it. Flying the black and white flag, with any version of skulls, crossbones, etc is a special feeling.
But you don't actually have to be a pirate to hoist the dreaded flag of the past.
One nations hero was another country's pirate, a truth still alive and kicking today (may have to substitute it for terrorist, insurgent, or any other term, though).
Also, sometimes military ships were using it to either scare the enemy, or to show that no quarter was expected, nor given.
The British Navy has a tradition to fly a Jolly Roger when returning to port when a submarine made a kill at sea. The Jolly Roger would have "x"s for every kill they made.