Because you want to.
All right, maybe you really don't want to write that discourse paper on the global warming threat (or lack thereof). But you do want to pass your class, and therefore you do want to write the paper, even if you would prefer to buy one off the Internet, instead.
Oh, and for the record: buying a school paper be a terrible idea.
Frankly, not all people sit down and write because they want to, and a good many who want to don't because they don't know where to start. Some sit down and begin writing because they've noticed something that can be written, or they are able to do it and need the extra money articles can bring. Others begin because they read something and decide, 'I can do better!'
But in many cases, someone sits down and starts writing because someone comes along and gives them a kick in the pants.
"Oh, but I can't think of a story!" Funny, you've only homeschooled three kids (or babysat, or shared information with a friend). You've never told a two-line story to help others understand something? Ever?
Many non-writers seem to have the idea that writers are unusually inspired, that full articles and stories (and research papers) pop into their minds, ready to be written. And something similar might happen to someone who writes a lot, on occasion.
But the truth is, writers work for their inspiration.
A writer might notice something, say an article complaining about things that are overused in pulp fantasy. That writer may sit down and decide to write a fantasy novel mocking those overused fantasy elements. So the writer—me—decides how to transform those stock clichés.
Most fantasy is third person, past tense, with elegant half-elf heroines and benevolent fairy godmothers who come to the rescue. Therefore, I decide, my heroine will be a quarter-elf klutz who's telling the story in the present tense from her perspective, with a troublesome (and fatally dangerous) fairy godmother… and my little klutz is paranoid to boot! Considering that difficult premise logically, that heroine needs a very good reason to be paranoid or the story's dead. Develop why that girl is paranoid of royalty—despite her being royalty—and what's do be done about it, and the plot starts to develop…
Likewise, someone may notice that he knows a little-known technique that helps some people memorize, or that few people know how learning styles work. Therefore, he might write some helpful articles on learning style from his own experience studying for school and tutoring others.
But when someone who writes for a living, or works on a short story or novel, sometimes he must sit down and force himself to find ideas. Techniques for doing that vary, and some people find their best techniques vary with what they're writing.
Having an idea to explore or something to say is the best reason to write and will bring out the best writer in you. It is possible to force yourself to write because you must… like research papers, but be aware that you'll have to work a lot harder to write as well as you can.