Why would the magnetic switch on my refrigerator door trip when the freezer door opens instead?
Well, the problem is solved, thanks to a great insight from @bcworkz in the comments.

It turned out that there was another magnetic switch at the very bottom, below the fridge door, and this is what is meant to trigger the light.  For reasons unknown, the light had decided to activate only by the freezer door switch, even after I unplugged the whole unit and plugged it back in.  However, @bcworkz's comment about the control board having a problem got me thinking, so I started pressing buttons on the control panel at the back of the fridge.  I pressed the left-hand button that selects fridge or freezer when making temperature adjustments.  And lo, the lamp turned on immediately!

So I don't know why this whole thing happened, and pressing the button again doesn't make it broken again, but it's behind us now, presumably some strange bug in the embedded system logic.