H-1B visa is a work visa and as such is not employer specific. Once you are in the US with one employer, it is very easy for you to switch companies. The new company also has to file a petition, you don't go through the lottery process (since you already have the visa). USCIS just reviews your case and approves your petition with the new employer. It takes about 4-6 weeks, but it is not too much of a hassle.
Source: On an H-1B visa and have switched employers.
I spent 10 years on H1B and my experience (and many of my other friends) does not match yours. Two things:
1. H1B involves a lot of paper work/legal work. There are not that many companies who are familiar with the process and are willing to spend time and energy to sponsor your H1B. This reduces the potential employer pool drastically. (Personal anecdote: I used to do contracting when I was on H1B and could not accept many potential job offers due to H1B)
2. While it's true that you are not subject to H1B quota, you are still subject to the process and can get your petition rejected. (Persona anecdote: My friend tried to switch companies on H1B and found that the LCA was rejected because company lawyer made a mistake)
I disagree. Legally, yes you are allowed to switch. But in practice, it brings in too many complications. H1B is a 6 Year visa. If you have spent more than half of that time period, try getting a job with a new employer. Very unlikely that they will be interested knowing that you only have 2 or less years to be allowed to stay in America.
Ok what about green card then ? Sure, you can file for a Permanent residency but if you are from a Country like India/China/Philippines, guess what ? You may take a decade to get that PR while you are technically stuck with the same employer. Can you still switch jobs ? Sure you can. Will you want to though ? Perhaps not knowing that you have to re-start the entire PR process again.