The person who stuck Nietzsche and Marx together knew what they were doing. Both are exponents of atheism, which gained increasing traction in Europe in the late 19th century, but they arrived at completely different philosophies. Marx wanted to make the world more just, or rather, he predicted that it would inevitably happen because revolution was unavoidable in a world where the gap between rich and poor continued to widen.
Nietzsche also knew the world was unjust, but he believed you had to accept that and try to make something beautiful out of it. There is beauty in the struggle, he thought. What they had in common was their materialism.
“You’re what you eat,” said Marx. “Remain faithful to the earth,” said Nietzsche. Both philosophers are viewed with suspicion today, a reputation I believe they don’t deserve. They can hang together, side by side, on your wall.