I accepted a job replacing a few customer supplied lights in a new condo. The customer asked if the box would hold 20 lbs and "what about 40 lbs?" That's not a code question. That's a question of fact. Did the installing electrician do a good enough job that the box will hold the weight.
One light was over a granite-topped island.
So, for a couple hundred dollars not only do I install the lights, but I guarantee the box is solid, replacement of the counter-top if it happens to get damaged and replacement of the light if it gets damaged. I'll bet you couldn't buy that kind of insurance for a couple hundred dollars.
Maybe what bothered me was taking a crappy light down three times to adjust the height from inside the canopy. Maybe it was spending an hour unwrapping the first fixture because it gave me too much time to think. I think installing residential lights exactly 29 inches above the counter is the low point of my job.
A "fan rated box" will typically state a rating of 70lbs for fixture support IIRC. I've hung a 35lb chandelier from one before and it seemed pretty stable. Anything super heavy is going to be lagged into a ceiling joist if I'm doing it.
Lighting can certainly be a royal pain. When bidding construction I always put in my bid that we will install "standard" fans and fixtures provided by the customer. "Non standard" fans and fixtures are charged extra at an hourly rate. As far as who determines what is "standard", that would be me.