This would refer to bad news about a company being made public, and senior managers being demoted or sacked because they either allowed the situation that caused the bad news, or they did not take steps to fix the situation (or cover it it up).
Of course, the cynic in me would say it is to protect the bosses further up.
Heads rolling, (meaning to be punished), comes from the time in England that had beheading as a punishment, usually for higher ranked nobles and officials, and especially for treason against the king or queen.