Once upon a time, people wrote books with pens on paper. That was such a laborious process that only the heroic, and hugely talented, attempted it. Then came typewriters, and with them, more authors. Today, everyone on the planet has two word processors, it seems, and authors abound. Some are outstanding, and some, well, need more practice.
Publishers feel inundated with unsought manuscripts, and frankly, most are never read.
The best agents work hard to establish a reputation for excellence, because the rest of the agents simply cannot get many of their submissions read. So, the best agents are the ones who sell the books. You want one of those agents representing you, and your challenge is to attract one. Publishers have quotas in various genres. When a quota is filled, they won't look at books in that category, period.