Technically, dross is a by-product of metal smelting (where metal is extracted from a type of rock called ore). Other hot liquids form dross, as well. If you've ever made chicken soup from scratch, you might have had to skim off the frothy scum, or dross, that floats to the top while the soup is simmering.
The definition of dross isn't limited to by-products, though; the general meaning is waste matter, worthless stuff, rubbish, or something that's inferior.
In James Joyce's A Portrait of the Artist as a Young Man, Father Arnall warns his students against indulgence — a sinful act:
For how miserable will all those pleasures seem to the soul condemned to suffer in hellfire for ages and ages. How they will rage and fume to think that they have lost the bliss of heaven for the dross of earth, for a few pieces of metal, for vain honours, for bodily comforts, for a tingling of the nerves. They will repent indeed . . .