Because I'm interested in these things I've put in a bit of time to get my thoughts down on the problem from a purely academic point of view and thought some people may be interested to see what I have put down, for those that aren't feel free to skip over it.
To assess the orientation of the phone, the processor receives the triaxial data from the accelerometer, and resolves the acceleration data measured on each axis.
When the phone is perfectly horizontal as shown below (assuming the axis of the accelerometer are perfectly aligned to the phone) there should be no acceleration measured in the z axis, and a full 1g acceleration measured in the y axis.
Please note - where I have used the term sensor values related to measurements of g, obviously these values are processed based on raw electrical data output from the sensor, however for the sake of clarity of point I will continue referring to the sensor values in g.
[url=http://i128.photobucket.com/albums/p188/sport1901966/HorizontalAligned_zps07c2c75e.png]Image[/URL]
If the phone is rotated around the x-axis (into the page/screen) y gets smaller and z gets larger, until they are equal. At this point, when y = z, the angle of rotation is 45°, past that point z gets larger as y gets smaller until z = 1g and y = 0g, at this point the angle is 90°.
[url=http://i128.photobucket.com/albums/p188/sport1901966/RotatedAligned_zps8ae66d93.png]Image[/URL]
If the sensor has a resolution of 0.0625g between a range of ±2g (as per the new Bosch accelerometer), as the phone is rotated around the x-axis the next step that the accelerometer will pick up after y = 1g and z = 0g will be y = 0.9375g and z = 0.0625g. The angle of the phone is calculated based on the values of y and z using trigonometry. The size of the measurement step (sensor resolution) determines the angular resolution of the sensor, following processing of the raw data. Below is a table comparing the resolutions of the ST and Bosch sensors. It would seem the ST sensor resolution is massively overkill, but the Bosch sensor is about 1000 times less precise - going completely the other way.
[url=http://i128.photobucket.com/albums/p188/sport1901966/Restable_zpsf3fb0cad.png]Image[/URL]
That is the first, and more concerning problem as others have mentioned - as was said, how can the phone display increments of 1° when the sensor can only resolve changes of 3.8° . The only posibility is that the gyroscope is used to assess the motion of the phone within the angular steps that the accelerometer can measure - fairly complex from a programming point of view, but possible I think.
The other issue is the fact that when set flat, the 5S does seem to believe it is inclined anywhere between 2 and 6 degrees. This could well be because the accelerometer is not in fact orientated correctly in the phone as shown below.
[url=http://i128.photobucket.com/albums/p188/sport1901966/Horizonalmisaligned_zps1efc0c60.png]Image[/URL]
It has been mentioned that the zero g offset difference between the 2 sensors could be the cause of the problem. But I am not sure this is the case. In terms of the inclinometer output, it doesnt matter what the absolute g value measured is, simply that when the phone is flat, only 1 axis is measuring any acceleration. For example as long as the z axis has a value of 0g, it doesn't matter if y is measuring 0.2g or 20g, the trigonometry will output a 0 value for the angle. However, if apple haven't accounted for the extra offset of the Bosch sensor and continued to use the ST sensor offset, then the software could think z is measuring an acceleration when it isn't.
If it is simply an orientation problem, then it should be a simple case of low level recalibration in the OS as others have said, obviously the complication being where different phones seem to have the problem to different degrees. The only accurate way to do it would be to allow individual calibration of the phone. If the offset is the problem, this should be fixable by a more 'blanket' solution, assuming the sensors are all within spec.
Do you think that Apple's alleged "calibrate by leaving in do not disturb mode for a long time" could work in practice (i.e. at the moment only some simple bug is stopping it)?
Of course the phone does not know it is on a level surface or not, but if it just knows it is stationary then taking multiple readings of the direction of gravity over an hour (improve the statistics of the measurement) could allow the direction and magnitude of gravity to be calibrated. A level surface is then just any surface perpendicular to the direction of gravity.