If the entity (be it a corporation or AGI-driven corporation) learns from the punishment (or its peers learn by observation) it doesn't matter if the entity is sentient, the outcome is less of the unwanted behaviour. I didn't mean anything more complicated than that.