Have to agree that pirates need to take in the value of the cargo into consideration, but again to be fair, not every pirate has a calculator handy or is willing to do the math, so more or less they come up with a price thats either near/far or even way below the profit margin that your going to sell it for.
Space isn't friendly, and its full of unfriendly turrets waiting to catch you on a bad day... so by that, it can be hard to sit out in space and take in consideration of ones cargo at a whim, but then again... If a pirate is on a particular route, surely he's going to know what sort of traders hes going to come across...
And for an experienced pirate, there is no excuse for demanding over the top fee's.
Piracy is after all, robbing the cargo/credits worth for the cargo, and getting away as fast as possible. Nothing worst than a pirate who weighs in your rank and demands credits based on your status rather than your ship and your cargo. In my opinion, pirates should always demand a reasonable amount based on cargo and ship, nothing else, no rank thats supposed to be invisible, just based on what you would see if you were there.
Although regarding your encounter with the corsairs, I think the corsairs were fair. There was 3 of them, not one, they all have to get a cut, and they were only off by 1 million profit. So take the hit and take it on the chin is what I say;)