Both floor and ceiling sag result from questionable construction methods.
The most common causes of floor sag in residential and commercial buildings is misaligned load-bearing walls and long spanning floor joists and/or beam girders. It is not unusual for a home or commercial building to have a central hallway area that parallels the front and rear walls in the long direction. The floor joists and ceiling joists and roof rafters will all span in the short direction across the home. The ceiling joists will typically span from the front/rear to the hallway walls making the hallway walls load-bearing. The front/rear roof rafters will also typically be braced to the hallway walls making them even more load-bearing. If there is one central beam girder located near the center of the hallway, the two hallway walls can overload the floor joists which frame into the center beam and cause floor sag. This more often occurs when the floor beam is located beneath one of the hallway walls. The other hallway wall will overload the floor joists and cause sag. Another cause of floor sag is whenever tall walls, like foyers or great rooms, overlie floor joists which have long spans. If the joists are not designed for the extra heavy weight of the tall wall, they can sag.
Similar to floor sag, ceiling sag is usually caused by long spanning ceiling joists or main beams which support the ceiling joists over large rooms. Also, similar to floor sag, having load-bearing second floor walls located above the mid-spans of the lower level ceiling joists can cause ceiling sag.