A floundering Bay Area office market helped Goodwill pave its way to purchasing a new San Jose headquarters site.