The number 39 refers to the 39% tariff rate on Switzerland. Kind of insane that the American President just made up a lie that tariffs are paid by foreign countries and rest of the administration just went along with it. It flies in the face of any common sense.
I don't know how this tariff stuff works, so for my own understanding, how come countries retaliate to US tariffs by imposing retaliatory tariffs? Are they punishing their own nationals?
In the same way that Trump is punishing Americans with the import tariffs, yes. However that is just the primary effect, not the goal.
If you eat less you might go hungry, but that doesn't mean the goal was to go hungry. Rather it was to lose weight, and going hungry is just the direct effect.
Part of the goal of retaliatory tariffs is symbolic, part is to indirectly put pressure on Trump by affecting US export industry.