The Grignard reaction is conducted under anhydrous conditions. Otherwise, the reaction will fail because the Grignard reagent will act as a base rather than a nucleophile and pick up a labile proton rather than attacking the electrophilic site. This will result in no formation of the desired product as the R-group of the Grignard reagent will become protonated while the MgX portion will stabilize the deprotonated species. 
To prevent this, Grignard reactions are completed in an inert atmosphere to remove all water from the reaction flask and ensure that the desired product is formed. Additionally, if there are acidic protons in the starting material, as shown in the figure on the right, one can overcome this by protecting the acidic site of the reactant by turning it into an ether or a silyl ether to eliminate the labile proton from the solution prior to the Grignard reaction.