I don't think Microsoft is amateur enough to hire coders without making that clear. If the employee don't want to share his work with MS, then he'll get the boot.
So it should have been commonly expected?
Definitely. The coder is under no obligation to share the source code unless it was clearly pointed out in the contract.