The objective of the visa is to enable business. It is beneficial to America that business flourishes in America. If a pharma business is viable only if it pays $100k to its researchers and if it is being hamstrung by lack of researchers in America it doesn't matter that a software engineer can charge $200k for his services.
The pharma researchers may argue that this should present an upward price pressure on their salaries but their industry isn't solely driven by salaries alone.
At the higher salary that gets a company enough researchers, the company may become unviable. In addition, if there are only 100 researchers and there are 1000 jobs, rising salaries will still leave 900 jobs unfulfilled.
These are things one doesn't care about if one is a researcher because systemic economic slowdown will take a while to catch up to you because there are more jobs than researchers.
But thinking above that in the long term, it is advantageous to have more researchers since more jobs filled leads to more successful companies which leads to growth.
In truth it's more complicated. There are a large number of unqualified people who carry the credentials claiming they're qualified. For the same title, skill levels vary substantially. This is why people believe good lawyers are far better than average lawyers, that good doctors exist, and that the concept of a good software engineer exists.
This means that while there is apparent supply, there is no real supply. This makes the problem less apparent but no less real.
The government distorts markets for its own reasons and one of them is the long term economic health of the country. The most efficient distribution may be that most companies should be in Africa. The government doesn't want that. It wants companies in the US. It organizes in the long term to allow this.