Quick answer: it's violence.
In writing about crime in space I've come to the conclusion it probably is not going to be what we expect. Space pirates are not going to hunt down their prey, plan an ambush from behind a small moon. I never understood how they got to see the target but the target didn't get to see them. LOS should work both ways if playing Squad Leader taught us anything!
Space pirates still might have cutlasses. But space is not an ocean (more lie a Black desert plug plug!).
So while my previous post explained that limited space piracy was possible with hard science rockets (and enough work and sneaking) going after a ship is just plain stupid if you have any better targets and there are plenty following stable predictable orbits and with no ability to maneuver!
They're called space stations.
So what if they see you coming a month or more away? You look like anyone else coming in to stop for water and stores. You're always stopping for water; the stuff has a million uses. You get there and swarm the place. Even better wait for other ships to be docked and you might grab one of those too! I mean look, they're just sitting there docked!
There are still things a savvy station owner can do to minimize the risk of pirate attacks. If your establishment is under spin to create gravity you're probably trying hard to keep one section counter rotating so it's a stationary docking port for ships. Stop doing that. Have a station hub, a reinforced module with a bunch of different docking ports for ships be a defensive feature. If the new customers have a suspicious number of parrots, eyepatches and rolled 'R's open an empty docking port to vacuum. Repeat as necessary.
If you're going to hit a station the loot might be immense. You will want to make sure it's immense. Because you're going to want to lay low and pay people to ignore you for a long time after this. Spies or inside men will pay for themselves many times over. Not only do they provide tips, a bit if sabotage works wonders to reduce resolve.
Also note a smart pirate will plan to attack a station and stay the hell away from underground bases in asteroids or moons. Those places have entrances at the end of tunnels and usually lots and lots of explosive charges. Blowing a habitat in a station could be suicide. Blowing a tunnel and collapsing it (optionally full of invaders) is something most miners won't think twice about.
Mines are usually dealing in raw materials though certainly some refining takes place to avoid wasting propellant carting slag around. You might not be interested in 200 tons of semi pure iron. Much better to hit a station where it is already in the form of useful manufactured goods.