Before the law was passed, it was up to the network to decide how much they wanted to charge for unlocking.
Many of them, and three were a big culprit for this, used to take the retil value of the phone and how much more contract time you had left when trying to get a phone unlocked.
Naturally, this upset a good many people who complained to Ofcom. Hence the new rules. I recal horry stories from Nokia users on Orange who were asked for unlocking fees of up to £200 to get their 6230i's unlocked from that network. As well as stories from three customers trying to get their N70's unlocked so they could punt them on Ebay.
Things are a lot more civilised now, and I would be surprised to see the corner shops and market stands offering this service stop doing it soon.