If a dimmer switch were a resistor, it wouldn't work at all with LED lights (the AC->DC converters in them don't just lower the current they provide when the AC input gets lower).
In incandescent lights, a variable resistor would burn a lot of power unnecessarily, so instead they use phase cut dimming (with a triac switch) where the dimmer cuts out a variable portion of the AC cycle. That way you reduce the effective duty cycle of the power without burning the energy. This works well for incandescents because the filament glow scales nicely with the with the power being delivered to the bulb. It works poorly with (some) LED bulbs because the turn on/off time is slow relative to the power cycle, and the LED brightness itself doesn't just scale nicely with the current from the rectifier.
In incandescent lights, a variable resistor would burn a lot of power unnecessarily, so instead they use phase cut dimming (with a triac switch) where the dimmer cuts out a variable portion of the AC cycle. That way you reduce the effective duty cycle of the power without burning the energy. This works well for incandescents because the filament glow scales nicely with the with the power being delivered to the bulb. It works poorly with (some) LED bulbs because the turn on/off time is slow relative to the power cycle, and the LED brightness itself doesn't just scale nicely with the current from the rectifier.