No, historically OS's haven't been linked to hardware like iOS is. Imagine if every time you got a new webcam, you had to buy a new version of Windows. XP was supported for 12 years, iOS 12 was officially discontinued after 1 year. You're talking about orders of magnitude difference in time.
I didn't make the equivalence of iOS to XP, the commenter did. I did pick iOS 12 to make a point, but you're right it is apples to oranges, and that's also proving my original assertion.
The original comment was that Apple should charge for iOS versions, to which I was saying that is a bad idea. By your comment, (I think), you would agree with my statement.