Once upon a time, there were many highly experienced, very capable editors working for the big publishers. It was possible to send queries and manuscripts directly to the publishing houses for consideration, thereby creating the infamous slush pile and the phrase, “Over the transom,” referring to a small window that opened out into the hallway and was located above the office door. Ah, but the bean counters came into power, and they were very smart at saving money for the bottom line.
The older, experienced, very expensive editors were let go with a pat on the back and a thank you. Young, intelligent, much cheaper editors were hired to fill some of the slots that had been vacated; however, they would do little actual editing. Rather, they were essentially book project managers. The preponderance of real editing would henceforth be done by freelance editors (many who had just lost their jobs) paid for by the authors smart enough to do so.
In addition, the publishers said, they no longer would accept contact from unrepresented authors. Suddenly, there was a need for knowledgeable agents to represent authors. Eureka, the recently laid off editors decided to become agents. They would receive the queries and manuscripts. They would decide who they were willing to represent. They would maintain contacts with their old publishing houses and determine what hot new directions they were wanting to go.
Those bean counters were so bright. Their laying off the editors saved money initially and also created a filtering system (the agents) who gave good service for free, as far as the publishers were concerned. The authors paid for that service out of their commissions on their royalties. And so, that is where we are today, and now you understand the system and how it came to be.