Why? There are several different reason that are fairly common. One is that the work submitted is not consistent with the focus of the journal. Very often, the manuscripts that I have rejected were simply poorly written and redundant and did not represent a contribution to the field or to the journal’s intended audience. Often, the manuscript represented a considerable amount of work on the author’s part, but simply was not clear in the presentation or while might have been new and interesting to the author or authors, has been well covered elsewhere in the literature. And very often, the sense was that it was written in order to publish something, but not to inform the journal’s audience of something novel or useful.
In every case, I wrote in detail why the manuscript was not recommended for publication and what I felt would need to be done to make it suitable for publication. Only a few times have the authors resubmitted the manuscript with my concerns addressed and the improvements were sufficient to then recommend the paper be published.