At that point, Joe is in breach. Who can file suit against Joe and force him to perform? In that scenario, only John can. If Sue files a suit, the principal of privity of contract will preclude her from any rights under the contract because she was not a party to it. Sure, she can argue that Joe's breach caused her harm, but she probably can't file suit to enforce the contract and that only makes sense. If Joe didn't know the contract was put together to essentially benefit Sue, then it's hard to argue that he owes her a duty under the contract.
Third party agreements, then, get around the general privity of contract concept.