Why are slugs catergorized with mollusk even though they do not have a shell?
There are several reasons why. Firstly, not all slugs lack shells. Several slugs have (small) internal shells and in some species these shells are obvious
In others the shell is typically buried in the the mantle or reduced to just calcium crystals, others do completely lack a shell. Secondly, and probably most importantly, “slugs” evolved from molluscs! “Slugs” are not a real taxonomic category as the term slug is given to any shell-less gastropod so slugs are in no way a monophyletic group. Anyways, we call slugs molluscs because they evolved from molluscs! Slugs in most cases (I’m not getting into marine lineages) are descended from snails that eventually lost or had a reduction in their shells.
Finally and this is definitely the most important reason, not all molluscs have shells! The phylum mollusca has multiple classes, which typically united via the presence of a muscular foot or a mantle:
Octopodes lack true shells and there is even a whole class of molluscs that completely lack shells, the aplacophora (which translates to: not plate bearing). Aplacophorans are pretty rare and worm like in form, most species are burrowers and many have calcium spicules embedded in their mantles to provide rigidity.