To be honest I think the H1-B route isn't worth it even if you were trying to maximize profit at all cost. It really only makes sense when you need to get someone with a high level degree to live is a crappy rural place to staff a military contract or something similar where you legitimately can't find anyone willing to do it with the quals you need. Indentured servitude doesn't yield the highest level of performance, and as you certainly know it's not only possible but likely to see a multiple X delta in productivity from a great dev vs a journeyman dev in a way you wouldn't see with, say mechanical engineers. I'd happily compete with a company that was trying to beat me by hiring H1-B workers all day long, in fact I've been involved in some interesting conversations about how that indicates a weak competitor.