>The median salary of someone on H1B is higher than someone not on H1B.
Not within the same job in the same location they aren't.
If you're on an H-1B and you get fired or laid off, you have 60 days to find a new job or be deported. That creates an underclass of workers who are willing to put up with much worse working conditions and work longer hours. That drives down working conditions and wages for everyone.