For me it seems there are 2 reasons to have Pirates.
1: Where there are goods worth money there will be those seeking to take them.
Like today they take the ship off load the goods then sale the ship back to the owners or Insurance company, as the ship many time is close to value as the cargo.
2: Where there are Political groups a Privateer system allows capture of ships and crew, cargo and information, without having to Declare War.
Also it serves to weaken the bonds of the farthest colonies as the home worlds are not the ones providing tech. A pirate base set up in a remote system that takes care of the populace will find a lot of friends.
And deep down it is fun to think about them.
Did you know the Age of Sail Pirates had a disability system, death benefits, and many other systems in place to t take care of their people.
Pirates in Space will work much like the wet navy ones, spies will be bribed to tell them when and where a cargo ship will be, what it is carrying and so on. Many Civ ships will also run routes supplying X to one system and carrying Y to the next, this type of commerce is very open to pirates, each stop is information.
Good Luck looking forward to the 4.0 stuff even though I am still lost on 3.2
Lee