“Cora tries to steal the compass from Emma and Mary Margaret; Regina and Mr. Gold must put David’s life in danger in hope that he will contact Mary Margaret.”
I think the putting Davids life in danger part, is that they put him under the sleeping curse. So that he can enter ‘the red room’ where Henry was. They probably figure out that this is a means that they can use to communicate with those in FTL. Mary M have also had the dreams, and been under the curse, so maybe they hope, or maybe they believe that she is who David will meet in ‘the red room’.