I feel like mary margaret always gets the short end of the stick despite being a nice person and she was the one solely blamed for what happened with david and Katherine but as we can see here is trying to do the right thing and really push him away.
The book babbler I think that’s intentional since the point of Regina casting the dark curse was to make Snow White miserable, so of course she is going to get all the blame for the affair and not David.