That sounds good in theory, but in reality you end up with worse outcomes than doing nothing:
a) The target country just allows their citizens to feel the brunt of the sanctions while the ruling class hoards resources for themselves.
b) The target country starts a propaganda campaign to blame the sanction-issuer for all their problems, which the citizens mostly believe.
So ultimately you end up with regular-Joe citizens in the target country having a worse quality of life, while also being led to believe that your country is the evil one.
Another poster hit the nail on the head: the politicians in the sanction-issuing country need to be seen as doing something by their populace, regardless of what the result of that something is.