i dont know why people think that the plot is going haywire or it doesnt make sense in the last few episodes.none of the things which have happened in the last few episodes is unrealistic because it still happens in many rural villages right now.
honestly this drama is sadly a perfect reflection of real life.society is full off people with grey shade who switch sides according to the situation they are faced with.