Pots try to combine the functions of a resistor and a switch, by rubbing a contact on a naked resistor.
So on the face of it, you have a bad idea. But it is cheap.
Traditionally, pots have noise when you are changing them, because resistor-stuff isn't the best contact material. Also some increase of noise even when not moving.
Modern pots work very well. True, the changes made to improve contact with the resistor-stuff may (or may not) conflict with other properties of an "ideal" resistor like voltage coefficient and noise. But obviously modern pots are "good enough" for many high-end systems.
(If you want to build a constant-impedance pad, it is hard with a switch but very-hard to do well with pots. But nobody does that any more.)
For stereo, it is very difficult to get two resistor tracks exactly the same. That unbalances channel levels. Tolerances even on good stereo pots may exceed +-20% or 2dB, however my experience is that most inexpensive stereo pots track to 1 dB over the main part of the range.
Pots have infinite resolution in theory, and very-fine resolution in practice (limited by roughness and flaws in the resistance). Switched attenuators have steps. If you want "inaudible" steps over a wide range, you need lots of steps. If you want 1dB steps over a 40dB range, that's a 40-position switch. More than a few steps radically increases costs. A cheap 6-position 2-pole switch costs $1.19, I paid $22 for a good 12-way 2-pole switch, and 20+ pole switches are mostly custom-order with large minimums and high prices.
Back in the old days, Daven made audio step attenuators that look very much more robust than these little plastic things you show. Huge contacts and wipers designed to never lose contact, and easy to clean. Now, maybe it is true that modern switch technology with sealed contacts is better than the old ways, but it looks like an expensive toy to my old eyes.
I do live recording for a living. If a pot makes static when I try to sneak the level down, the recording is ruined and the customer gets mad. That's a more critical problem than playback, where you can always listen again. Even so, I no longer use stepped attenuators. In fact I have often used the Radio Shack $2 dual-pot. One I installed 20 years ago has had to be replaced (for "scratchy") once. The balance does shift a dB or so as you turn it, but in live recording I don't turn it much and the source is never perfectly balanced (I can fix that in the mix if desired).
ALL gain-change systems have problems. Pots scratch. Switches step. Photoresistors don't match. Multipliers are noisy. Gm stages run out of current when deeply attenuated. DACs step and getting dB steps is messy, and the post-amp has a hard job. Even if you work only in the digital domain, the math-unit has to have twice the bits of the signal data, which means a mainframe class math register. All things considered, pots aren't so bad and are great bargains.
-PRR