I've spoken to different people in polite casual conversation about their reasoning for doing this stuff.   I find that what it usually boils down to is a sense of superiority on the part of the motorists backed up by some kind of moral or social justification.  Cyclists are viewed by these types as lesser people, and so directing abuse towards them is deemed permissible in their view.  That said, most people are pretty reasonable and respectful about sharing the road as long as you are too.