Think of MS "investment" into FB as an advance payment for their advertising deal. MS guarantees $150m/year to FB in revenue. MS is losing a lot of money on even that deal so the last thing they wanted was to allow Google to take that advertising avenue away from them.