comes from an old saying
"He/She is turning in his/her grave". It means that what the offender did is so egregious
, it would offend
the dead person so badly that they would turn their back
on the deed. It also implies that the dead person was a champion of the cause that the offender is insulting.
To turn your back on someone is a serious insult, for obvious resaons, and that a dead person would be moved to perform such an act means that whatever the offender is doing is pretty bad.
Of course, everything undergoes inflation, and simply turning one's back is no longer enough. Therefore the term has inflated to "spinning" as the person in the grave repeatedly turns their back on the offender.