Numerous third-party camera apps already exist on the App Store which allow users to stitch together multiple photos into a panoramic image. 360 Panorama is the best example I can think of, and it does a really good job of creating panoramas from multiple images.
It seems Apple considered including photographic panorama functions in iOS 5 but hasn't made them available to end users -- at least not without tweaks. Developer Conrad Kramer found the code for panorama functions buried within iOS 5 and posted a series of screenshots on Twitter in addition to the finished panorama above.
According to Kramer, iOS developers can enable panorama functions in iOS 5 by setting "Enable FireBreak" to "Yes" in com.apple.mobileslideshow.plist. Non-developers with jailbroken phones can instead download chpwn's "Firebreak" from Cydia when it becomes available.
It's not 100 percent clear why Apple didn't include this panorama function in iOS 5's public release. It's difficult to judge how well Apple's own solution works from a single panoramic photograph, but it certainly doesn't look as impressive as the panoramas that 360 Panorama generates.