Suboptimal texts and some of the reasons
Texts are somehow like movies; they introduce and develop some objects over time. Having set the stage (context), the director introduces a topic, which s/he describes then from a chosen point of view, to move then on in various directions. To enable the onlooker to understand the movie (What is the point? How did we find the solution? What caused the coming about of some event?), the film director has to provide cues allowing the person watching the movie to grasp the topic, to see the details and to realize the evolution of the topic (topic changes, or return to the initial topic). In discourse, this is done via language, though the hardest parts are done in the brain. They are being taken care of by the reasoning and conceptual component: choice of the topic, relative order (development), type of connections, importance (focus) of the various elements at a given moment, etc. If sentences are like snapshots, texts are more like movies. They both have a framework, but the slides of a movie evolve over time. Hence, producing a good movie is, cognitively speaking, more demanding than taking a good snapshot.
While it is easy to tell whether a sentence is correct or not, it is not easy at all to do the same for a text. We may even wonder whether it makes sense to use the notion of correctness in this case. Texts span a wide spectrum, ranging from very well written to hardly understandable, with various stages in between. There are many reasons why a text may not read well: lack of coherence or cohesion, faulty reference, inadequate choice of a linguistic resource, etc., just a few examples to illustrate our point.