Phone Cameras iPhone 4 vs Nokia 520?

The other day i was looking at an iPhone 4 photo and a Nokia Lumia 520 photo of the same thing.
They both have 5 mega pixel cameras but the iPhone looked so much better than the Nokia.
The iPhone was clear but the Nokia seemed to outline everything. Also the Nokia focuses automatically in the middle but the iPhone does not.
Why is the iPhone clearer?

The iPhone has always for the most part had a better camera until it comes to megapixels. Since the amount of MPs was the same on each camera, it's probably due to the fact that Apple has spent years developing the iSight camera. Nokia was basically given A camera of some sort. Through the years though Nokia has teamed up with Microsoft and they developed the Carl Zeiss lens for their cameras and if you look at comparison photos, you'll see a major difference.