All journals I have come across their guide for authors require a cover letter. Although it's probably partially a remnant of older times, where letters and manuscripts were mailed to the journals, it does have functionality.
The cover letter is a quick way for the editor to decide if it's even worth opening the full article. For this reason, arguments on the novelty, findings, importance, challenges and perspectives of the work should be demonstrated. In practice, it might not be much different than the abstract (different structure of course), but some journals also ask for specific questions to be answered.
It also helps the editor, who might not have the same expertise as the manuscript, to decide whether it's worth sending the manuscript to external reviewers. It also saves him a few hours of work from reading the whole article to understand its value.
It also adds a degree of personal communication between the corresponding author and the editor, rather than being a automated, impersonal submission process.
Finally, I usually add sentences like "all authors have agreed to submit the manuscript in this journal" or "no conflict of interest" etc, which adds a signature under the statements.
In the case a cover letter would only say "here it is", I think the editor would probably drop it in the trash bin, unless:
- The title (and the abstract) conveys a subject so important that any editor could not bear not to check it out more thoroughly.
- The corresponding author, or one of the co-authors, is a really big name in the field, that (even if the article is not that important) the editor cannot just reject it.
So, in mathematics, maybe just saying "Here is the solution of the problem X" and everyone knows the problem and die to see the solution, then you don't need to add much. But in sciences where a problem doesn't have a name, a more detailed explanation might be required.
Lastly, the manuscript is indeed evaluated by the manuscript itself. However, a good cover letter might make the editor check your submission more thoroughly, out of the tens or hundreds of manuscripts they may receive.
I think of it as the trailer to a movie. If you like Batman and you see Batman on the title, you will check the movie a little more before deciding if it's a crap movie or not. If you see a movie is directed by let's say Spielberg (and you like him), you may do the same. But if you are unsure about the title and you don't know the actors and directors, a trailer might convince you to watch the movie.