An on/off switch is simple and easy to build. An on/off switch moves two pieces of metal together or moves them apart. A light dimmer must gradually and smoothly change the current that reaches the light. It has more components that an on/off switch and must be carefully assembled. An accurate dimmer (where 25% means exactly 25%) is even harder to build.
The same is true for the tiny devices inside of a silicon chip. On/off switches are relatively easy to fabricate. Easy to build means that the devices are cheap, small, and reliable, and millions of them can be put in a small area.