depends was the fine enough to make their action nonprofitable? if a fine is less than the profit from the action then its a cost of doing business
Plenty of companies do actions (like Uber) where they lose money for market share. So, penalizing McKinsey by making them forfeit profit isn't as big a punishment as it may seem.
It's a bit akin to if you were to steal a car, sell it, pay yourself a fee for that action and then have to return any money beyond that fee to the owner of the car. It's clearly a net gain for you still.