They crack, their threads strip and their seals harden, and a housing that does not seal lets unfiltered air or oil past the element.
Air filter housings are listed with their clips and their inlet and outlet diameters. A housing that is not sealed to the intake duct pulls air from the engine bay rather than through the filter, which is worse than having no filter at all in dusty conditions.
Oil filter housings on cartridge-style engines are a common failure point, particularly the plastic cap. The cap is usually available separately and is worth replacing rather than reusing when it has been overtightened.
Listings state whether the housing includes the element and the seals, because buying a housing that assumes you already have both is a common mistake.