I guess this is going to turn into something totally off topic.
People pay for something if they feel the money they're exchanging is worth what they're getting. If a company has something that people are buying, and there're a good market who thinks that company makes better products, the company can go ahead and make the prices higher, as long as people are willing to pay for it. If Apple raised the prices too high, they wouldn't be making a lot of money.
With Macs, You're getting OS X with no EULA violations or need to go through a (from what I hear) tedious installation process. you're getting Apple's award winning customer support and repair coverage, and you're getting unmatched build quality. In addition to that, with the laptops you're getting little things like the magsafe... thing, backlit keyboard, bluetooth, and bigger things like a really nice battery, multi-touch trackpad, and the system will also seamlessly switch to and from integrated graphics on the fly to conserve battery life.
Macs aren't right for everyone, but they're worth it to many. I'm willing to pay for an iMac in the future because I love OS X, the build quality is excellent, the displays are beautiful, and I won't need a tower with a million cords running everywhere.
Also, I don't think iPhones are really expensive when compared to other multi-touch smartphones.