Because it wasn't originally what it became, and it didn't resemble what we now call 'nationalism' in the United States. "The Duties of Man" is a very enlightening book, available free on google books Here. Mazzini, one of the fathers of the unified Italian state, is probably the best representative of continental mid century liberalism there is. It's not classical liberalism, but it's not the liberalism of the early 20th century, which is more familiar . Instead, it's an interesting sort of melange of socialist ideas, individualist ideas, ideas relating to a general belief in Humanity, and appreciation for local culture . The latter, acting against larger political and cultural domination, is what I think nationalism was originally about.
Italy's Risorgimento or Unification is a prime example of this. Before the Risorgimento, what we now think of as Italy was parceled out into different spheres of domination, some controlled by Austria, some by France, some by the Vatican, and some belonging to miscellaneous monarchies. Nationalism meant people not being the plaything of monarchies. Things like language,culture, and history were convenient demarcators.
It was no doubt a rough process, in Italy and elsewhere, with the reality being that there isn't just one Italian language but a series of dialects that are closely related. The same can be said of Spain . Span isn't just Spanish but Catalan, Basque, Asturian, and other language and cultural groups. Nevertheless, using language and vague ideas of a common culture was a start.
I think that people can look back to the period without the taint of the later ideas relating to nationalism adhering to them, especially if they combine it with a socialist base and a general Marxist interpretation of history. Straight out materialistic historical materialism, taken in the sense of vulgar materialism, which Marx himself condemned, however, misses the point on this as it does on certain other things.
*on edit: the good part of "The Duties of Man" starts in Chapter 3: The Law. The first two chapters deal with Mazzini's frustration with socialism and with his conception of God. Although he uses the term "God" over and over, it can certainly be interpreted in a metaphorical sense, in that it's not particularly chained to a denomination of Christianity but something much more general. This too is part of what the mid 19th century presented.