That example is also apples and oranges. Given that a passport is much more expensive to make, has a ton of infrastructure mandated by international agreements, treaties, and standards, and is decidedly optional for the majority of people and it makes total sense to me that it would not be free. None of that is true about SSNs, and none of it would necessarily need to be true about a national ID.
I get free photo IDs all the time when I visit cloud data centers and they print me off a photo+QR code badge for the time I'm there. Drivers licenses are expensive because they are made to be extremely durable. They're made that way because they are constantly needed, not because of the photo printed on them. There's absolutely no reason whatsoever why a national ID card would have to be like a drivers license and not like a social security card. In fact, if they were legally required to be free they would very likely be just a name and a QR code. Leave all the photos to the back end, it's 2020.