In the US there is a long-standing issue with H1B (work) visas, where there's many more applicants than free spots, which results in a sort of lottery on who gets to immigrate to the US. Likewise the diversity lottery only accepts 0.5% of applicants because there are simply far too many people willing to immigrate to the US.
But why rely on lotteries to decide who gets to immigrate? Why not simply auction-off every single long-term residency visa using a second-price auction or a Dutch auction? This could allow the country to completely eliminate all rules on who is allowed to immigrate (except for basic things like the lack of criminal records) and simply rely on the free market to decide which people are currently in demand by the economy. Likewise it would be impossible for companies to abuse the system to invite underpaid workers as only the most valuable employees would make the cut.
Or perhaps there are already countries which use auctions to decide their immigration policy?