Something is written for various reasons. Usually, something is written for someone else to read. It can also be written strictly for the benefit of the writer. Writing is used in casual communication, formal settings, and in situations where someone's skills and knowledge are being shared or assessed in a professional way.
Writing is a cognitive skill. It is choosing from a possible list of words to create a thought. It is possible to choose appropriate words and join them together in an effective way. It is also possible to jumble things up and make sentences and paragraphs difficult to understand and comprehend. Usually, sub-par writing is not intentional, but it can be if the writer is strictly trying to match a word count, get something submitted to demonstrate effort. How often has a student just put words together quickly to satisfy an assessment criteria without really taking the time to craft the answer? How many times have you done this?
There are many things to think about. For example, the word choice, tone, how much to put in a sentence, in a paragraph, how to bridge, and so forth. There is skill involved if you want to hook the reader and lead them to an important point. Why does someone want to keep reading? Why does someone want to think about what is written?