I personally would prefer to working remotely (at least 4 days a week) unless my commute is less than 15-20 minutes but executives put significant value in seeing people working from the office. If they'll decide to save (offices are not cheap) and hire a remote developer what would stop from hiring around the world? Developer salaries in developed countries (and especially the US) are much higher than world average.
Working from office you compete with candidates in the same city or in the same country if willing to relocate. Working remotely one have to compete with the whole world.