I don't think the interest in using XPath is at all related to being able to check what class an element has, and in fact the linked discussion does not have anything to do with that, so I mean yeah, that's pretty bad but not anything anyone is asking to do in this scenario.
CSS 2 as I remember was some years after that, and googling it seems to be August 2002.
At any rate in this example
//*[contains(concat(' ', normalize-space(@class), ' '), ' foo ')]
I don't think the interest in using XPath is at all related to being able to check what class an element has, and in fact the linked discussion does not have anything to do with that, so I mean yeah, that's pretty bad but not anything anyone is asking to do in this scenario.