There are some technical or scientific points important to that journal and the editor does not need the opinion of reviewers, then he has the right to reject. Regards.
To be honest, this is a very common phenomenon in the research experience of our lab members.
After we submit an article to the editorial board, the editorial board sends it to the editor-in-chief of the relevant field. It is the editor-in-chief's responsibility to conduct the initial review, including the format of the article, whether the content is relevant to the positioning of the journal, etc.
In short, it is a normal phenomenon for editors to reject a manuscript directly without peer review. After all, the current volume of academic publications is very large, and it is a big workload to find the corresponding professional reviewers.