It’s a good example that no one - not even Marx - is free from biases. Marx still has some of his middle class sensibilities around him when he talks about the lumpenproletariat. And I do not buy the argument some make that when Marx calls them “the dangerous classes”, he means they are dangerous to capital; I think he just means he thinks they are dangerous.
And that’s ok. Not every word Marx wrote should be taken as gospel. Nor does that mean the concept of a lumpenproletariat doesn’t have any analytic value.