That's a bit like saying coders can just make a game then license the IP to TV stations, moviemakers, writers and merchandisers as a secondary revenue stream. It happens but it's rare enough that it may as well not exist for most. Musicians on the other hand almost all play gigs (as well as being able to sell their music to videogame makers, TV shows and movies), and the movie industry practically invented merchandising as well as other avenues of income.
But that requires they build a fanbase. And in that endeavor, a literary agent is far more beneficial than an industry trade group
Literary agents liaise between writers and publishers/producers etc. They have nothing to do with building up a fanbase, most authors do all of their marketbuilding themselves, in their own time, on their own dime.
And it's been pretty well established that there's few (if any) people who pirate media that would run to Amazon or iTunes and buy something if they couldn't obtain it via piracy.
Certainly established to the satisfaction of people who pirate books anyway.
And most of the books I buy from new authors these days most often comes from authors who do things like release the first book in a trilogy for free or via word of mouth suggestions from people who are where I was in my teens and twenties and read stolen or borrowed versions of their books.
Freely released books are a very different matter to piracy, especially from creators who can least afford it.