Presumably Salesforce can find something else useful for him to do for the one year term of the non-compete agreement. It doesn't prohibit him from working at a Microsoft competitor. It only prohibits him from working in a role directly competing with what he did at Microsoft.
> Would Salesforce have hired him if they knew that he could not perform the job for a year?
They essentially did. I doubt very much that Salesforce didn't know about the non compete and they there was a very good chance it would be enforced, since it's not the first time a Microsoft non-compete has been challenged and upheld.
It's hard to imagine they were not previously aware of the non-compete. So you can only assume they WERE aware, and just thought they could win, or should challenge it.