This movie is based on actual crimes. It doesn't oversimplify this into 'good guys' and 'bad guys': it retains the complexity, even with the young assistant as attempted moral center.
The laws of the time limited the supply of corpses for medical schools. Executed criminals only. There were more students than available bodies. Most teachers stayed within the law. Others --
'Resurrection men' such as Burke and Hare made a living robbing graves and selling the corpses to medical schools. Desperate for specimens, the doctors paid the money.
B & H really did change their MO after a fellow-lodger died. They turned from one nasty crime -- grave robbery -- to flat-out murder.
(Sometime after the pair donated themselves to science, the laws about sourcing corpses were amended. That put a serious crimp in the 'resurrection' business.)