It's never made sense that H1B Visas are awarded by lottery instead of salary. In a lottery system a company can game the system by applying for thousands of visas.
If they were to do it based on highest salary it would offer U.S. workers more pay protection, and it would still allow companies to bring over the high-quality talent they need.