Collective punishment of nations is the norm in international diplomacy. It is commonplace to hold everyone in a country responsible for the actions of their government.
For example, a declaration of war is usually directed at a country, rather than at particular individuals, even though many people in the country upon which war is declared have nothing to do with the policy or even actively oppose it, and someone who is a citizen of a country upon which your country has declared war is legally an "enemy" even if they did nothing personally to you.
The use of collective punishment largely reflects respect for the institution of sovereignty and the practical reality that the state imposing the sanctions doesn't usually have the practical ability to target the effect of sanctions to specific people in another sovereign state. It also reflects the belief that the leaders of a sovereign state upon which sanctions are imposed care enough about their citizens to be motivated to take actions that will relieve their country of the sanctions.
In short, sanctions directed at a country rather than at an individual are an imperfect solution for an imperfect world that have been used frequently historically when political actors in the sanctioning states decide that it is appropriate to do so.
In the case of the penultimate sanctions passed by Congress against North Korea which became law on February 18, 2016, Section 2 of H.R. 757 which was incorporated in an omnibus sanctions bill ultimately adopted sets forth the official purposes of the sanctions as set forth below.
In the most recent sanctions bill, which became law August 2, 2017 was H.R. 3364, sanctions against North Korea are contained in Title III of the law. Subtitle A seeks to "Enforce And Implement United Nations Security Council Sanctions Against North Korea" and Subtitle B seeks to address human rights abuses by the government of North Korea. The purposes set forth below from H.R. 757 carry over to the most recent bill because the most recent bill simply amends H.R. 757 while retaining the same findings and purposes set forth in Section 2 of H.R. 757.
As is generally the case, the goal is to change the government policies of the sanctioned country, not the punish a particular leader or group of leaders of that country.
SEC. 2. (22 USC 9201) FINDINGS; PURPOSES.
(a) Findings.--Congress finds the following:
(1) The Government of North Korea--
(A) has repeatedly violated its commitments to the
complete, verifiable, and irreversible dismantlement of
its nuclear weapons programs; and
(B) has willfully violated multiple United Nations
Security Council resolutions calling for North Korea to
cease development, testing, and production of weapons of
mass destruction.
(2) Based on its past actions, including the transfer of
sensitive nuclear and missile technology to state sponsors of
terrorism, North Korea poses a grave risk for the proliferation
of nuclear weapons and other weapons of mass destruction.
(3) The Government of North Korea has been implicated
repeatedly in money laundering and other illicit activities,
including--
(A) prohibited arms sales;
(B) narcotics trafficking;
(C) the counterfeiting of United States currency;
(D) significant activities undermining
cybersecurity; and
(E) the counterfeiting of intellectual property of
United States persons.
(4) North Korea has--
(A) unilaterally withdrawn from the Agreement
Concerning a Military Armistice in Korea, signed at
Panmunjom July 27, 1953 (commonly referred to as the
``Korean War Armistice Agreement''); and
(B) committed provocations against South Korea--
(i) by sinking the warship Cheonan and killing
46 of her crew on March 26, 2010;
(ii) by shelling Yeonpyeong Island and killing
4 South Korean civilians on November 23, 2010;
(iii) by its involvement in the ``DarkSeoul''
cyberattacks against the financial and
communications interests of South Korea on March
20, 2013; and
(iv) by planting land mines near a guard post
in the South Korean portion of the demilitarized
zone that maimed 2 South Korean soldiers on August
4, 2015.
(5) North Korea maintains a system of brutal political
prison camps that contain as many as 200,000 men, women, and
children, who are--
(A) kept in atrocious living conditions with
insufficient food, clothing, and medical care; and
(B) under constant fear of torture or arbitrary
execution.
(6) North Korea has prioritized weapons programs and the
procurement of luxury goods--
(A) in defiance of United Nations Security Council
Resolutions 1695 (2006), 1718 (2006), 1874 (2009), 2087
(2013), and 2094 (2013); and
(B) in gross disregard of the needs of the people of
North Korea.
(7) Persons, including financial institutions, who engage in
transactions with, or provide financial services to, the
Government of North Korea and its financial institutions without
establishing sufficient financial safeguards against North
Korea's use of such transactions to promote proliferation,
weapons trafficking, human rights violations, illicit activity,
and the purchase of luxury goods--
(A) aid and abet North Korea's misuse of the
international financial system; and
(B) violate the intent of the United Nations
Security Council resolutions referred to in paragraph
(6)(A).
(8) The Government of North Korea has provided technical
support and conducted destructive and coercive cyberattacks,
including against Sony Pictures Entertainment and other United
States persons.
(9) The conduct of the Government of North Korea poses an
imminent threat to--
(A) the security of the United States and its
allies;
(B) the global economy;
(C) the safety of members of the United States Armed
Forces;
(D) the integrity of the global financial system;
(E) the integrity of global nonproliferation
programs; and
(F) the people of North Korea.
(10) The Government of North Korea has sponsored acts of
international terrorism, including--
(A) attempts to assassinate defectors and human
rights activists; and
(B) the shipment of weapons to terrorists and state
sponsors of terrorism.
(b) Purposes.--The purposes of this Act are--
(1) to use nonmilitary means to address the crisis described
in subsection (a);
(2) to provide diplomatic leverage to negotiate necessary
changes in the conduct of the Government of North Korea;
(3) to ease the suffering of the people of North Korea; and
(4) to reaffirm the purposes set forth in section 4 of the
North Korean Human Rights Act of 2004 (22 U.S.C. 7802).