I'm not a camera person, don't really use it unless I need a mirror, however isn't it mostly about the camera software these days and not the mp that really makes a photo?
Here's a crop from a higher MP camera 1:1 shot in daylight outdoors (from about 10 feet away):
This image has more detail than any of the HTC One's images that are shot in daylight under similar conditions, and the HTC One would not be able to render that tight pattern on the shirt as well as this phone did. The lines on the knuckles would be less defined, among other things. If this wasn't a portrait image of the person there are other areas of the image where the One wouldn't be able to provide enough detail to compete with this picture... The image would be all-around worse except maybe it would be brighter and have their trademark tinting in it... This image comes from a Galaxy S II's (Skyrocket) camera (using Stock TouchWiz Camera Software). That phone was released in 2011, so I think blaming the software (you aren't doing that, just saying) is a bit of a stretch at this point...
The reason why the image is more detailed is cause the camera provides the means to render a detailed image. It doesn't matter how great HTC's software is. 4MP is still 4MP. They can have 10 cameras and the 4MP image will still be worse than what this old phone was able to pump out in these conditions due to the resolution disparity. There is literally no way to get around this. On top of that, camera software post-processing adversely affects the quality of a low MP image MORE than a high MP image because you can do things to limit the visibility of its "work" with a higher resolution image, which simply aren't as viable with a low resolution image. When the One does Noise Reduction and softens the edges of things in the image, it is 5x more prominent on those photos than on an 8-20MP photo because those edges were almost assuredly less detailed at the start, anyways...
Nokia's phones shoot out 5MP images (by default), but they use 20-41MP sensors and bin it down to 5MP so the detail is ridiculously high in those 5MP images - you can still actually crop from those and end up with decent output... The One's camera does not work the same way... It's
always better to take a larger image and then resize DOWN in a decent software package (if you want to power some noise out of the image, etc.), than to settle for a 4MP camera that takes much less detailed images and severely limits what can be done with the product.