My sister alerted me to a nice explanation of how a scientific paper should be written. The author, Prof. Stuart Shieber, describes three styles of writing a paper and which one you should use.
The first is the "continental" style in which you simply state the idea and show the data/proof. I think the name "continental" refers to those continental breakfasts where you choose whatever you want to eat from a buffet. This kind of paper has no motivation and to readers who are not experienced, makes it seem like you are really smart. It's also unreadable.
The second style is the "historical" style. It's kind of like writing a diary where you describe all the mistakes you made, how you changed your research direction, etc. A lot of students fall into writing in this way because they're doing their first big research project, it's all new to them, and they think their work is really important or want to explain how much they suffered during the process. The problem with this approach is that there is a lot of stuff the reader doesn't need to know and also, it might make you look like an idiot.
The third style is the "rational reconstruction" style. It's kind of a middle-of-the-road style between "continental" and "historical." You present an ideal history which only shows the steps that motivate your final result. It's kind of like if you made a movie of your life -- you would want to show the important events and tie them together in a consistent, meaningful manner. Sometimes you might need to embellish or downplay something a little to make the story more coherent or engaging.
The concise version:
"Continental" style - you state the idea without any motivation -> makes you look like a genius, at least to those whom you can fool into thinking that unreadable papers are brilliant
"Historical" style - you provide a diary of your research containing all the mistakes and changes in direction you made -> makes you look like an idiot
"Rational reconstruction" style - you give an ideal history, only present the relevant steps and motivate everything properly -> the one you should use