H1B holders have to be paid the higher of the prevailing wage or their employer's normal wage for similarly employed workers. So if a contracting company can ensure that the position their employees have is sufficiently different than the position a parent company is seeking to replace, there's an arbitrage. (This famously happened at Disney in 2014-15, with some workers directly training their H1B replacements.)
Every h1b role I see posted at my bank pays more than I make so I don't get the lower paid comments