Our GC's electrician recently installed a new 3-panel switch in our California bathroom to control two light sources and a dehumidifier/fan. I had wanted both light sources to be on the dimmer, but the electrician said only one can be on a dimmer according to code, and proceeded with putting the recessed ceiling lights on the dimmer assuming we'd prefer that over the dimmer-compatible wall fixture, which is now simply an ON/OFF switch, apparently to comply with code. The dehumidifier is automatic (don't ever have to touch it)/fan switch is manual, but does the story with the lights all sound legit? Can we really not have both the recessed lights and the wall fixture on dedicated dimmers in the same 3-panel switch?
Sounds like you have a "3 gang" switch.
I don't know your local code but your installer's statement sounds like nonsense. You note you have recessed ceiling lights. Plural. Obviously you don't need one dimmer switch per ceiling light, that would be ridiculous. So from the start the idea you can only have one light per switch is nonsensical.
There is a limit to how much power (total watts of all lights) your dimmer can control but if you're using LED bulbs it's extremely unlikely you are exceeding the power limit of even the smallest cheapest dimmer.
I can't even guess why your electrician would do this. Can't say he's lazy because what he did is more work.
One thing is possible: If the light bulbs on a dimmer are not all exactly the same brand and wattage, they may not dim uniformly. Perhaps your electrician was worried about that, or other unknown problems in the way dissimilar lights would behave on one dimmer, causing you to complain later on and so he just said the magic C word to avoid having to get into it with you.
Note that if you combine the lights onto a single dimmer you'll either have a switch that does nothing, or you'll have to buy a special cover plate with two openings and a blank.
Your explanation makes no sense as you are talking about "the dimmer" in one part of it and "dedicated dimmers" elsewhere.
The claim by the electrician makes no logical sense and I would contact the local building authority on it. 1, 2, or 3 separate can lights is exactly electrically equivalent to 2 separate light bulbs in a single overhead fixture on a dimmer which is certainly not prohibited by code. I would contact the building authority and ask about this. You can do what you want with your electrician but I know what I would do (after getting clarification from the code authority) and it would definitely not be nice. I'm so sick of people claiming code or legalities as a reason for not doing something when the real reason is they are too lazy to look up the relevant statue or code.