First, it's unlikely that a recruiter is going to get 20-30% of a person's salary forever. If we're talking about the US, it's more likely that the recruiter is going to be paid something like 15-25% of the candidate's first year base pay. They're not going to make money in perpituity.
Second, the recruiter isn't getting money that the candidate would otherwise get. Generally, the fees paid to recruiters are coming from the company and from a completely separate budget from the fees than the budget that is paying a candidate's salary. It's unlikely that you'd make any more if you apply directly rather than going through a recruiter.
Third, recruiters are hired by companies to find candidates. Generally, this means that the recruiter is taking on some of the HR functions that the company would otherwise have to perform. The recruiter is potentially wading through the crush of resumes that come in when they post a position on some job site. The recruiter may be searching job sites looking for candidates that would look to be good fits for the position. The recruiter is potentially doing the first round of interviews to find a suitable candidate which can often involve understanding in more detail what the company is really looking for and what the candidate is looking for in order to find a successful match. And the recruiter is potentially leveraging his or her contacts to find candidates that are potentially not actively looking for a new position but that might be interested in specific opportunities.
If what you are talking about is really a contracting company that is taking a cut of the billable rate, it's certainly possible to go around them. However, you're likely to find that the financial benefit is much smaller than what you might imagine.
First, the sort of companies that are working with large consulting companies are typically doing so in order to quickly get large numbers of temporary staff members quickly. When a company needs, say, 30 Java developers for a 9 month project, they don't want to go out and find and hire 30 freelance Java developers, it's much more convenient for them to call up Giant Contracting House and have 30 developers show up in a couple of weeks. This also makes ongoing administration much easier-- it's much cheaper all around for a company to process 1 invoice for 30 developers rather than 30 separate invoices going to 30 separate freelance developers. Since these large companies are generally more willing to pay higher rates than are smaller companies, some of the company's cut goes to finding, courting, and retaining these sorts of opportunities. Another part of the company's cut goes to doing the work in advance to have, in this case, 30 Java developers on the bench ready to be deployed at relatively short notice. A third part of the cut comes from the company's ability to negotiate from a place of strength-- a company providing 30 Java developers is generally going to be able to negotiate a higher rate than an individual freelancer would.
Second, the contracting company is handling the process of invoicing and is undoubtedly paying the contractors before the client pays them. Most freelancers have plenty of stories about dealing with invoices that got lost, clients that started paying later and later, or clients that went bankrupt shortly after paying an invoice where the money had to be paid back. Some of the company's cut goes to dealing with this aggravation and uncertainty and to ensuring that the contract resources are being paid on time whether the client is up to date or not.
Third, the contracting company is often paying some sort of salary while a resource is between contracts, it is often paying some of the taxes that a contractor would otherwise be paying (i.e. the employer's portion of the social security and Medicare taxes), and is often providing some sort of benefits whether that is just professional training, health insurance, etc. That overhead can easily be a substantial expense.
If you believe that the deal the company is offering is a poor one, you can, of course, decide to freelance. That means that you'd be spending a decent amount of time working to build and maintain relationships with potential clients rather than creating billable work. You'd be spending time dealing with unpaid invoices and you'd be responsible for ensuring that you have enough cash on hand to pay your bills while you wait for your outstanding invoices to be paid or to deal with refunding money to a bankrupt client. And you'd be responsible for everything that the contracting company provides. Just how much that's worth is, of course, a highly variable decision. Some folks are great developers that are also adept at marketing themselves and can create a very profitable niche for themselves with clients that pay high rates and always pay on time. But that's not the experience of the majority-- you'd need to decide whether you could get 70-80% of the rate the contracting company can and whether the extra hours and effort that a freelancer would need to invest are worth that overhead.