I would agree with this, if Burnham didn't take it upon herself to risk the lives of the entire ship and her crew as a means of potentially preventing further risk to the creature. That wasn't her call to make, regardless of whether she was making a clearly moral choice in relation to the creature's wellbeing.
See: A more nuanced approach to this exact philosophical quandary by a character who measures both repercussions with a sense of genuine weight, the Doctor Who episode The Beast Below.
It wasn't Burnham's fault that Saru ignored her recommendation, her warning, and condoned further torture of Ripper, thereby leaving them stranded in Klingon space. In those circumstances, it was up to Burnham to do what was necessary to prevent further harm being inflicted on the being, and damn the consequences—the crew of the ship had agreed to be there, to fight and die for Starfleet's principles. Ripper very much had not.
If Starfleet travels about the universe, doing what they will to anyone, anything, they encounter, simply because it's convenient for them, then they have no right to boldly go anywhere, and the universe would be better off without them. Starfleet officers are supposed to recognise this principle, and act with integrity in upholding it, even -
no, especially - in the face of unethical orders.
We're out here to explore. To make contact with other life forms. To establish peaceful relations, but not to interfere. And absolutely not to destroy. - Captain Jean-Luc Picard
That the ends do not always justify the means is perhaps one of the most fundamental lessons of Star Trek.