US immigration can be very slow and bureaucratic (even pre-Trump). I hesitate to say but generally, it's not as arbitrary as people think. If things are clearly above board, it works out.
The US still is a destination in very high-demand. There are a huge number of qualified and unqualified people, who would come here in a heartbeat (and it goes without saying, there are a huge number of people who have no interest in moving here).There are clearly agents like the H-1B body shops who have exploited the system. Similarly, masters programs were launched effectively to trade full tuition for an opportunity to enter the US labor market (e.g. all the masters in financial math programs). This doesn't mean we don't get amazing people on H-1Bs or in masters programs but these pathways have been exploited.
Many people desire a sane immigration policy and experience. One that allows promising candidates into the country. The exact definition of a "promising candidate" was outsourced to universities and companies sponsoring these visas. A lot of people have lost trust in those institutions. I don't know what a good solution is but the rise of these policies is a symptom that the current system is not working.