OFCOM's (UK phone regulators) guidelines on SIM locking:
Current guidelines on SIM-locking
A3.6 The mobile operators SIM locking policies should conform to guidelines issued by the European Commission and by Oftel.
A3.7 The European Commission guidance (from 1996) is that:
end-users should be made aware at the time of purchase whether their handsets are locked;
network operators/service providers should tell end-users that unlocking is possible, or provide upon request the information necessary to unlock;
the existence and amount of the handset subsidy (and any conditions for repaying monies due under the contract) should be made clear to customers at the time of purchase; and
handsets need not be unlocked until the subsidy has been repaid.
A3.8 Oftels guidance (from 1998) is that:
SIM locking may be justified by objective reasons, including for handsets that are subsidised;
customers should be able to unlock their phones once the handset subsidy recovered, which should in general be by the end of 12 months, if not before; and
any administration fee charged for unlocking should be related to the costs associated with unlocking.
At this sale price, there cannot be much or a subsidy to repay?
Guess it would also depend on the wording of contracts and such, i.e. if by buying the iPhone you were agreeing to enter a deal with O2/Apple for the 18th month contract? I'm not sure how it all works really!