Most of these companies are public, and therefore pay money to shareholders, and also pay taxes. The distribution of wealth is a separate issue, that could be dealt with by changes to the tax system.
Both sides on the H-1B debate come up with bad arguments for their cause, but the economics is very simple: labor is like any other commodity, and free trade is optimal, ignoring externalities. In this case the main externality is having a bunch of foreigners living in the US, and possibly staying: it's up to Americans how costly (or beneficial) they think this is.