The filing fees for an H-1B are $460 or $500 and then either $750 or $1,500, depending on the size of the company. If the employer works with an attorney, they would generally have to pay another $3,500 for an H-1B. If the employer gets a request for evidence, an attorney may charge another $1,500.
These are costs that the employer has to pay in order to sponsor a foreign worker. In addition, the employer also must promise to pay the prevailing wage. In other words, an employer cannot pay a foreign employee less than they would pay an American worker in the same position.
All of these fees and costs are in place to protect the American worker. Congress makes it expensive for employers to sponsor foreign workers so that employers favor American workers.