You're paying for the service, and I don't believe that AT&T offers a reduced product price even if you buy your new product through one of their outlets. You could buy an iPhone and not be with AT&T for the same price - what you do get a discount on is when you sign up for one of their extended services USING an Apple iPhone. You can check their site for more information on their offered plans.

Their 16gb & 32gb package deals are actually slightly more expensive than what you would pay if you bought the device directly from Apple because you're paying for their minimal 2-year service plan on top of the price of the phone. If you have no intention of using AT&T as your carrier then it'd be best to just buy the device from the Apple store.

I believe it has something to do with AT&T itself in the US, regarding their data plans and the costumers' loyalty.

No, you're right. I remember reading about this back when the 3G was announced. The reason the 3G was so much cheaper than the original was because Apple had managed to reduce its cost a bit but primarily because AT&T had subsidized it. So even though the phone itself was cheaper, AT&T was charging a bit more for their plans in order to cover for that.

Going by that, I'm guessing the carriers in UK didn't strike up a similar deal with Apple. On the bright side, your data plans are probably better in the long run.